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()这個函数没运行