为什么这个网页的JAVA SCRIPT函数不执行?各位大哥帮帮忙了!谢!!!!!
</head>
<body>
<script language="javascript">
function checkUserName()
{
if((form1.userName.value<3)&&(form1.userName.value>17))
alert("注册的用户名必须大于3位并小于16位!");
}
function checkPassrword()
{
if((form1.password.value<6)&&(form1.password.value>17))
alert("输入的密码必须大于6位并小于16位!");
if(form1.password.value!=form1.rePassword.value)
alert("输入的密码与确认密码不一致!");
}
function checkMail(mail)
{
if((mail=="")||(mail.indexOf('@')==-1)||(mail.indexOf('.')==-1))
return;
else alert("请输入正确邮件地址!");
}
///////////////////////////////////////////////////////////////////////////////////////////////
function ok()
{
checkUserName();
checkPassword();
checkMail(form1.mail);
form1.action="register2.jsp";
form1.submit();
}
function cancel()
{
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><div align="left"><img src="pic%20source/logo.gif" width="200" height="65"></div></th>
</tr>
<tr>
<td bgcolor="#A3B2CC"> </td>
</tr>
</table>
<form name="form1" method="post" action="register2.jsp">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="24%" height="25" bgcolor="#A3B2CC" scope="col"><div align="left">请填写注册信息(必填):</div></th>
<th width="32%" bgcolor="#A3B2CC" scope="col"> </th>
<th width="44%" bgcolor="#A3B2CC" scope="col"> </th>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">用户名:</div></td>
<td bgcolor="#DFDFDF"><input name="userName" type="text" id="userName" size="20">
</td>
<td bgcolor="#DFDFDF"> </td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">密码:</div></td>
<td bgcolor="#DFDFDF"><input name="password" type="password" id="password" size="20"></td>
<td bgcolor="#DFDFDF"> </td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">确认密码:</div></td>
<td bgcolor="#DFDFDF"><input name="rePassword" type="password" id="rePassword" size="20"></td>
<td bgcolor="#DFDFDF"> </td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">Email地址:</div></td>
<td bgcolor="#DFDFDF"><input name="mail" type="text" id="mail" size="20"></td>
<td bgcolor="#DFDFDF"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="24%" height="25" bgcolor="#A3B2CC" scope="col"><div align="left">请填写注册信息(选填):</div></th>
<th width="76%" bgcolor="#A3B2CC" scope="col"> </th>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">姓名:</div></td>
<td bgcolor="#DFDFDF"><input name="name" type="text" id="name" size="20" maxlength="16"></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">性别:</div></td>
<td bgcolor="#DFDFDF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="2%" height="25" scope="col"><div align="right">男</div></th>
<th width="6%" scope="col"><div align="left">
<input name="sex" type="radio" value="radiobutton">
</div></th>
<th width="0%" scope="col"><div align="left">女</div></th>
<th width="92%" scope="col"><div align="left">
<input name="sex" type="radio" value="radiobutton">
</div></th>
</tr>
</table></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">所在公司名称:</div></td>
<td bgcolor="#DFDFDF"><input type="text" name="textfield" size="20" maxlength="16"></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">职务:</div></td>
<td bgcolor="#DFDFDF"><input name="headship" type="text" id="headship" size="20" maxlength="10"></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">所在公司主营项目:</div></td>
<td bgcolor="#DFDFDF"><input name="business" type="text" id="business" size="20"></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">联系电话:</div></td>
<td bgcolor="#DFDFDF"><input name="phone" type="text" id="phone" size="20" maxlength="15"></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">MSN:</div></td>
<td bgcolor="#DFDFDF"><input name="msn" type="text" id="msn" size="20" maxlength="25"></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"><div align="left">OICQ:</div></td>
<td bgcolor="#DFDFDF"><input name="oicq" type="text" id="oicq" size="20" maxlength="12"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="24%" height="25" bgcolor="#A3B2CC" scope="col"><div align="left">个性化信息(选填):</div></th>
<th width="76%" bgcolor="#A3B2CC" scope="col"> </th>
</tr>
<tr>
<th height="25" bgcolor="#DFDFDF"><p align="left" class="style1">兴趣爱好:</p></th>
<td bgcolor="#DFDFDF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" height="20" scope="col"><div align="center">计算机软件
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td width="25%" scope="col"><div align="center">计算机硬件
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td width="25%" scope="col"><div align="center">旅游
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td width="25%" scope="col"><div align="center">美食
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
</tr>
<tr>
<td width="25%" height="20"><div align="center">健身
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td width="25%"><div align="center">读书
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td width="25%"><div align="center">宠物
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td width="25%"><div align="center">体育
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
</tr>
<tr>
<td width="25%" height="20"><div align="center">游戏
<input type="checkbox" name="checkbox" value="checkbox">
</div></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"> </td>
<td bgcolor="#DFDFDF"> </td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"> </td>
<td bgcolor="#DFDFDF"> </td>
</tr>
<tr>
<td height="25" bgcolor="#DFDFDF"> </td>
<td bgcolor="#DFDFDF"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="50%" scope="col"><input name="ok" type="button" id="ok" value="确认并提交" onClick="ok()">
</th>
<th width="50%" scope="col">
<div align="left">
<input name="cancel" type="button" id="cancel" value="取消注册" onClick="cancel()">
</div>
</th>
</tr>
</table>
</form>
</body>
</html>