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> </p>
<p> </p>
<p> </p>
<table width="387" heiaht="238" border=0 align="center" cellpadding=0 cellsapcing=0 background="image/login.jpg">
<tr>
<td width="187"> </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="登录">
<input type="reset" name="Submit2" value="重置">
<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时,有时会有莫名其妙的错误(大红叉),但把页面代码"全剪切了"再保存空页面,最后复制回去,再保存,又没有错误了,这是为什么
<%@ 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> </p>
<p> </p>
<p> </p>
<table width="387" heiaht="238" border=0 align="center" cellpadding=0 cellsapcing=0 background="image/login.jpg">
<tr>
<td width="187"> </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="登录">
<input type="reset" name="Submit2" value="重置">
<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时,有时会有莫名其妙的错误(大红叉),但把页面代码"全剪切了"再保存空页面,最后复制回去,再保存,又没有错误了,这是为什么
解决方案 »
- Math函数的问题
- struts2用validation验证时间的问题,请求帮助!!再现等
- 关于javascript的函数调用问题
- 比如系统今天的日期是2006-07-13,我要得到任何段的时间,比如得到昨天,后天,或者7天后的日期,怎么写JSP代码?
- 新手求教系列(二)
- 新手求教:怎样实现在表格单元格上单击弹出菜单,并记录当前单元格数值
- 关于UnsatisfiedLinkError错误
- 我是新手请大家帮帮我! 对数据库的查询
- 谁能帮我解释一下下面代码?有点不明白!
- 有人采用STRUTS开发模式开发JSP吗有的话请留下QQ便于联系
- 请教一个JSP页面通过sql语句查询出信息,但是空值的地方显示出为NULL,我想显示空的,应该怎么做?
- 如何解决SmartUpload下载中文文件名乱码的问题
==〉
<script type="text/javascript" language="javascript">
你能看出区别吗?你太粗心了!这代码我看着眼熟阿!??