我做了个验证码的判断,在jsp页面上进想判断,但是不管是否输入,对错,都能进到主页面,这是怎么回事?请高手帮忙看一下!我的jsp页面上的代码:<script language="javascript" type="text/javascript"> function HOPE_return()
{
 HOPE_check=document.HOPE_form;
if (HOPE_check.userid.value==""){
HOPE_check.userid.focus();
alert("请输入您的用户名");
return ;
}
if (HOPE_check.password.value==""){
HOPE_check.password.focus();
alert("您的密码不能为空");
return ;
}
if (HOPE_check.password.value.length>16){
HOPE_check.password.focus();
alert("您的密码长度最多只能输入16位!");
return ;
}
randomize validate = int(8999*rnd()+1000);
if (HOPE_form.validate.value.length==0){
  alert("出错了,您没有填写验证码。");
  HOPE_form.validate.focus();
  return ;
} if (HOPE_form.validate.value.!="+<%=request.getSession().getAttribute("rand")%>"+"){"        
  alert("出错了,您填写的验证码不正确。");
  HOPE_form.validate.focus();
  return ;
}  
}</script>
<input type="image" name="imageField" src="images/User_Login_0_13.gif" style=" width:40px; height:40px;"   
  onSubmit="function HOPE_return();" /><td align="left"><img name="validate" src="ValidateCode" alt="验证码"></td>