Register.jsp页
==========
<script LANGUAGE="JavaScript">
checkEmpty不具体写了
function check(){
if (!checkEmpty()){
alert('someone is empty');
window.location.href=('Register.jsp'); }
} ------------
当弹出'someone is empty'点确定后,直接跳到登陆页面了,而且地址栏为http://localhost:8080/projectSystem/Register.action
我现在只想让他待在注册页面
谢谢
==========
<script LANGUAGE="JavaScript">
checkEmpty不具体写了
function check(){
if (!checkEmpty()){
alert('someone is empty');
window.location.href=('Register.jsp'); }
} ------------
当弹出'someone is empty'点确定后,直接跳到登陆页面了,而且地址栏为http://localhost:8080/projectSystem/Register.action
我现在只想让他待在注册页面
谢谢
解决方案 »
- 用JSONArray.fromObject(list).toString()时报错,请问如何解决
- session过期的问题 大哥们看看吧
- freemarker分页的问题
- java填写表格内容
- 连接Oracle数据库时报错:java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource
- 关于框架Echo2和struts hibernate spring区别?
- 跳转页面
- jfreechart在Aix下中文显示乱码
- JSF中h:commandLink的action属性值问题!!
- 如何在JavaBean类中使用JSP页面中定义的<jsp:usebean>变量
- 请教,哪里能找到Google,yahoo,LEC ,world language等等的翻译接口?
- 企业看重应聘者做过什么项目?
<script language="javascript">
<!--
function checkForm( oForm )
{
oForm.disabled = true;
if ( confirm( "确认提交吗?" ) )
{
if ( checkEle( oForm ) ) oForm.submit();
}
oForm.disabled = false;
event.returnValue = false;
}
fuinction checkEle( oForm )
{
do some check ...
}
//-->
</script>
用'document.location.href='行不
LZ该补强JS了var name = document.all.yourname.valuevar name = document.getElementById("d").valuevar name = docuemnt.forms[0].elements["yourname"].value
if(name==""){
alert("不能为空");
return;
}
<form>
<input type="text" id = "d" name="yourname" />
if (!checkEmpty()){
alert('someone is empty');
//window.location.href=('Register.jsp'); //注释或者删除这行不就呆在原页面吗?
}
}
为什么alert();之后 要让他 window.location.href=('Register.jsp'); 把这个删除不就好了
checkEmpty不具体写了
function check(){
if (!checkEmpty()){
alert('someone is empty');
}else
{
window.location.href="Register.jsp";
}
}
这样不就可以了么???
在配置文件配置文件中配置注册画面初始化请求。window.location.href=/项目名/命名空间/注册画面初始化请求.action;
如果还可抛出一句话,那么就可能是你window.location.href=('Register.jsp'); 没有用啊
因为可能你用的编译工具并不支持啊