jsp中调用:<body onLoad="Image()">
js文件:
//登录前检查
function checkInput() {
//检查用户名
if (loginForm.username.value=="") {
loginForm.username.focus();
alert("用户名不能为空!");
return false;
}
//检查密码
if (loginForm.password.value=="") {
loginForm.password.focus();
alert("密码不能为空!");
return false;
}
checkPost();
return true;
}
function checkPost(){ //防止得利提交
var isCommitted = false;
if(!isCommitted){
isCommitted = true;
return true;
}else{
alter("不能重复提交!");
return false;
}
function Image(){
window.location.href = "http://localhost:8080/loginuser/servlet/ImageGerator";
alert("Image");
}
}为什么Image()这個函数没运行
js文件:
//登录前检查
function checkInput() {
//检查用户名
if (loginForm.username.value=="") {
loginForm.username.focus();
alert("用户名不能为空!");
return false;
}
//检查密码
if (loginForm.password.value=="") {
loginForm.password.focus();
alert("密码不能为空!");
return false;
}
checkPost();
return true;
}
function checkPost(){ //防止得利提交
var isCommitted = false;
if(!isCommitted){
isCommitted = true;
return true;
}else{
alter("不能重复提交!");
return false;
}
function Image(){
window.location.href = "http://localhost:8080/loginuser/servlet/ImageGerator";
alert("Image");
}
}为什么Image()这個函数没运行
解决方案 »
- 为何jsp中调用bean函数返回字符串最大长度与页面跳转参数相关?
- 晕 这个异常,请教怎么处理
- FCK.EditorWindow为空或不是对象
- 能解释多少就来解释多少咯, JavaScript的问题
- java web工程遇到的问题
- 急啊,,大家帮忙看看,,关于file流的问题?
- lxbbs V0.5 下载(中文名:飘叶论坛)
- Dataset has no unique row identifier?
- tomcat4.0中,一个包含class的jsp文件为何出错?
- http statuS 404-/servlet-ums
- 麻烦高手来解决一下 在线等 急等~~~~~~~~~~~~~~~~~~~~~~~~~~
- 关于servlet文件上传的问题
function Image(){
alert("Image");
window.location.href = "http://localhost:8080/loginuser/servlet/ImageGerator";
}