📄 9.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language="javascript">
function form()
{
if (document.form1.username.value ==""){
alert('用户名不能为空');
form1.username.focus();
return false;
}
if (document.form1.password2.value!=document.form1.password1.value){
alert('两次密码不一致');
form1.password2.focus();
return false;
}
if (document.form1.password1.value.length<6 || document.form1.password1.value.length>12){
alert('密码长度不符合');
form1.password1.focus();
return false;
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="2.asp" onsubmit="return form();">
<table width="396" border="1" align="center">
<tr>
<td colspan="2"><div align="center">管理登陆:</div></td>
</tr>
<tr>
<td width="122"><div align="right">用户名:</div></td>
<td width="258"><input name="username" type="text" id="username"></td>
</tr>
<tr>
<td><div align="right">密码:</div></td>
<td><input name="password1" type="text" id="password1"></td>
</tr>
<tr>
<td><div align="right">确认密码:</div></td>
<td><input name="password2" type="text" id="password2"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交" >
<input type="reset" name="Submit" value="重置">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -