JSP页面用户登录时用户名或密码不能为空

<%@pagelanguage="java"contentType="text/html;charset=gb2312"%><html><head><title>登入窗口... <%@ page language="java" contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>登入窗口</title>
<style type="text/css">
body{
font-size:12px;
margin:0px;
}
#login{
width:300px;
height:200px;
background-color:gray;
position:absolute;
left:50%;
top:50%;
margin-left:-150px;
margin-top:-100px;
text-align:center;
}
#login h1{
font-size:12px;
background-color:#0B5D21;
color:#F2F2F2;
line-height:2em;
width:5em;
text-align:center;
position:absolute;
margin:0px;
top:-2em;
}
table{
text-align:center;
margin:20px auto;
}
tr{
line-height:3em;
}
td{
color:#F2F2F2;
font-family:幼圆;
}
#in1{
border:0px;
border-bottom:1px solid #0B5D21;
background-color:gray;
}
#in2{
font-size:14px;
text-decoration:none;
display:block;
float:right;
border:2px solid #7D6F34;
margin-right:2px;
width:60px;
background-color:#0B5D21;
color:#F2F2F2;
line-height:2em;
height:30px;
}
a{
font-size:13px;
text-decoration:none;
display:block;
float:right;
border:2px solid #7D6F34;
margin-right:2px;
width:60px;
background-color:#0B5D21;
color:#F2F2F2;
line-height:2em;
}
</style>
<script language="javascript">
<script language="Javascript">
function check()
{
if(form1.usernm.value=="")
{
alert ("错误提示:用户名不能为空!");
return false;
}
if (form1.userpwd.value=="")
{
alert ("错误提示:密码不能为空!");
return false;
}
return true;
}
</script>
</head>
<body>
<FORM ACTION="handlelogin1.jsp" METHOD="POST" name="form1">
<div id="login">
<h1>请登录</h1>
<table>
<tr>
<td><B>用户账号</B></td>
<td><input id=in1 type="text" name="usernm"/></td>
</tr>
<tr>
<td><b>用户密码</b></td>
<td><input id=in1 type="password" name="userpwd" onclick="check()"/></td>
</tr>
<tr>
<td colspan="2">
<a href="input1.jsp">注册</a><input id=in2 type="submit" value="登录" onClick="return check()">
</td>
</tr>
</table>
</div>
</FORM>
</body>
</html>
帮我看看哪里错啦,为什么没弹出窗口提示
展开
 我来答
tiandesgin
2012-09-26 · TA获得超过169个赞
知道小有建树答主
回答量:357
采纳率:100%
帮助的人:238万
展开全部
<script language="javascript">
<script language="Javascript">
去掉一个
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
5Z_Rende
2012-09-26 · TA获得超过535个赞
知道小有建树答主
回答量:1032
采纳率:0%
帮助的人:233万
展开全部
我爱你 。(*^__^*) 嘻嘻……
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式