求助!为什么表单检查不了啊?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<Script language="javascript">
<!--
function checkinfo()
{
if (document.form.tname.value=="")
{
alert("帐号不能为空");
return false;
}
if (document.form.tmobile.value=="")
{
alert("请填写密码");
return false;
}
if (document.form.ttel.value=="")
{
alert("请输入验证码");
return false;
}
}
-->
</Script>
</head>
<body>
<form id="" name="form1" method="post" action="addsave.asp" onSubmit="return checkinfo()">
<table width="693" height="253" border="0" align="center">
<tr>
<td colspan="3"><div align="center">添加新记录</div></td>
</tr>
<tr>
<td width="212">姓名:</td>
<td width="179"><label>
<input type="text" name="tname" id="tname" />
</label></td>
<td width="288"> </td>
</tr>
<tr>
<td>性别:</td>
<td><label>
<select name="tsex" id="tsex">
<option>男</option>
<option>女</option>
</select>
</label></td>
<td> </td>
</tr>
<tr>
<td>出生日期:</td>
<td><label>
<input type="text" name="tcsdata" id="tcsdata" />
</label></td>
<td> </td>
</tr>
<tr>
<td>手机:</td>
<td><label>
<input type="text" name="tmobile" id="tmobile" />
</label></td>
<td> </td>
</tr>
<tr>
<td>固定电话:</td>
<td><label>
<input type="text" name="ttel" id="ttel" />
</label></td>
<td> </td>
</tr>
<tr>
<td>地址:</td>
<td><label>
<input type="text" name="taddress" id="taddress" />
</label></td>
<td> </td>
</tr>
<tr>
<td>QQ:</td>
<td><label>
<input type="text" name="tqq" id="tqq" />
</label></td>
<td> </td>
</tr>
<tr>
<td>E-mail:</td>
<td><label>
<input type="text" name="tmail" id="tmail" />
</label></td>
<td> </td>
</tr>
<tr>
<td colspan="3">
<label>
<input type="submit" name="button" id="button" value="提交" />
</label>
<label>
<input type="reset" name="button2" id="button2" value="重置" />
</label></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
[[it] 本帖最后由 w136290854 于 2008-10-21 12:27 编辑 [/it]]