验证的问题
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>例---验证</title>
</head>
<script language="VBScript">
sub check()
if frm1.user.value=empty then
msgbox "请输入您的留言昵称!"
exit sub
end if
frm1.submit
end sub
end sub
</script>
<body>
<form name="form1" method="post" action="">
<p align="center" lang="af"> </p>
<table width="60%" border="0" align="center">
<tbody>
<tr>
<td colspan="2"><p align="center">
<font color="#0066CC"><strong><font size="+2">用户验证</font></strong></font>
<p> </p></td>
</tr>
<tr>
<td width="19%"><font color="#3399FF">姓名:</font></td>
<td width="81%"><font color="#3399FF">
<input type="text" name="user">
</font></td>
</tr>
<tr>
<td><font color="#3399FF">性别:</font></td>
<td> <font color="#3399FF">
<input id="male" type="radio" name="male" value="1" checked="checked" />
男
<input id="formale" type="radio" name="formale" value="0" />
女</td>
</tr>
<tr>
<td height="20"><font color="#3399FF">年龄:</font></td>
<td><font color="#3399FF">
<input type="text" name="age">
</font></td>
</tr>
<tr>
<td height="20"><font color="#3399FF">就业去向:</font></td>
<td> <font color="#3399FF">
<select name="select">
<option value="学生">学生</option>
<option value="工作">工作</option>
<option value="生意">生意</option>
<option value="房地产">房地产</option>
<option value="国营">国营</option>
</select>
</font></td>
</tr>
<tr>
<td height="27" colspan="2" align="center"> <font color="#3399FF">
<input name=B1 type=submit value=" 提 交 " onclick="check">
<input name=B2 type=reset value=" 重写 ">
</font>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
问题在于VBScript这里我想单击提交后姓名的VALUE为空就显示MSGBOX
但是现在这个验证根本不起作用
请帮忙,谢谢!!
还有我想在加一个控制姓名的文本不超过10个字符的验证
<script language="VBScript">
sub check()
if frm1.user.value=empty then
这里该如何写呢???
exit su b
end if
frm1.submit
end sub
end sub
</script>