<html>
<body background=photo/2.jpg>
<table>
<form action="enter.jsp" method="post" onsubmit="return checkForm(this);">
<tr>
<td><h3>用户名:</td>
<td><h4><input type="text" name="username"></td>
</tr>
<tr>
<td><h3>密码:</td>
<td><h4><input type="password" name="password"></td>
</tr>
<tr>
<td><input type="submit" value="登录" name="submit"></td>
<td><input type="reset" value="重置" name="reset"></td>
</tr>
</form>
<tr>
<td>
<form action="GetPassWord.jsp" method="post">
<input type="submit" value="忘记密码?" name="getpass">
</form>
</td>
<td>
<form action="register.jsp" method="post">
<input type="submit" value="新用户新注册" name="regist">
</form>
</td>
</tr>
</table>
</body></html>
<script language="JavaScript">
function checkFrom(form){
if(form.username.value==""){
alert("用户名不能为空");
form.username.focus();
return false}
if(form.password.value=""){
alert("密码不能为空");
form.password.focus();
return false;
}
return true;
}
</script>
评论3
最新资源