asp表单验证,帮我谢谢,加好给我,得能运行哦

来源:百度知道 编辑:UC知道 时间:2024/06/08 18:37:57
<html><meta http-equiv="Page-Enter" content="revealTrans(duration=5, transition=23)">

<body BACKGROUND=im/lmbk-008.jpg text="#000000">

<p> </p>
<p> </p>
<p> </p>
<form method="post" action="message.asp">
<table width="400" border="0" align=center>
<tr>
<td height="24"><div align=left>学    号: <input type="text" name="UserId" maxlength="20" size="20"></div>
</td>
</tr>
<tr>
<td height="24"><div align="left">姓    名:
<input type="text" name="UserName" maxlength="20" size="20" >
</div></td

<html><meta http-equiv="Page-Enter" content="revealTrans(duration=5, transition=23)">

<body BACKGROUND=im/lmbk-008.jpg text="#000000">

<script language="javascript">
function checkform(f){
if(f.UserId.value==""){
f.UserId.focus();
alert("请填写学号");
return false;
}
if(f.UserName.value==""){
f.UserName.focus();
alert("请填写姓名");
return false;
}
if(f.UserYear.value==""){
f.UserYear.focus();
alert("请填写年");
return false;
}
if(f.UserMonth.value==""){
f.UserMonth.focus();
alert("请填写月");
return false;
}
if(f.UserDay.value==""){
f.UserDay.focus();
alert("请填写日");
return false;
}
if(f.UserTel.value==""){
f.UserTel.focus();<