login.jsp原代码:
<%@ page pageEncoding="gb2312"%>
<html>
<head> <title>Login.jsp</title>
<script type="text/javacript" language="javascript">

function adminLogin(){
if(document.form.account.value=="")
  {
    window.alert("请输入管理员帐号");
    return false;
  }
   if(document.form.account.value!="fuyou")
{
   window.alert("您输入的帐号有误"); 
   return false;
}

if(document.form.password.value=="")
  {
    window.alert("请输入管理员密码");
    return false;
  }
    if(document.form.password.value!="fuyou")
{
   window.alert("您输入的密码有误");
   return false;
}
return true;      
}
</script>
</head> <body>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="387" heiaht="238" border=0 align="center" cellpadding=0 cellsapcing=0 background="image/login.jpg">
<tr>
<td width="187"> &nbsp;</td>
<td width="207"><table width="180" align="center">
<form name="form" method="post" action="forwardBack.jsp" onSubmit="return adminLogin()">
<tr>
<td width="80"  height="30">帐 号:</td>

<td width="150">
<input name="account" type="text" size="18">
</td>
</tr>

<tr>
<td  width="80" height="30" >密 码: </td>

<td width="150">
<input name="password" type="password" size="18">
</td>
</tr>
  <tr align="center">
<td height="30" colspan="2">
<input type="submit" name="Submit" value="登录">&nbsp;
<input type="reset" name="Submit2" value="重置">&nbsp;
<input type="button" name="Submit3" value="退出"
onClick="javascript:window.location.href='button_back.jsp'">
</td>
</tr>
 </form>
 </table>

</td>
</tr>
</table>
<a href="addTitle_back.jsp">a</a>
</body>
</html>这这页面是javascript没有用,return adminLogin()不检查账号和密码,错误提示如下:Line:46
Char:1
Code:0
Error:缺少对象
网址:http://localhost:8080/vote/login.jsp
我在写jsp时,有时会有莫名其妙的错误(大红叉),但把页面代码"全剪切了"再保存空页面,最后复制回去,再保存,又没有错误了,这是为什么