js在jsp里不生效!!!!!
如题,附上两个文件的代码,实在找不出问题,求解答!
register.jsp
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>用户注册</title>
<script language=JavaScript src="script/regcheckdata.js"></script>
</head>
<body>
<form name="form" action="register.jsp" method="get" onSubmit="return checkdata()">
<input type=hidden name="action" value=register>
<table width="750" align="center" border="2">
<tr>
<td colspan="2" align="center">用户注册</td>
</tr>
<tr>
<td>用户名:</td>
<td><input type=text name="username" size="30" maxlength="12"></td>
</tr>
<tr>
<td>密码:</td>
<td><input type=password name="password" size="30" maxlength="12"></td>
</tr>
<tr>
<td>密码确认:</td>
<td><input type=password name="password2" size="30" maxlength="12"></td>
</tr>
<tr>
<td>电话:</td>
<td><input type=text name="phone" size="15" maxlength="12"></td>
</tr>
<tr>
<td>地址:</td>
<td><textarea rows="12" cols="80" name="addr"></textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="提交">
<input type="reset" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
.js
function checkdata(){
var ssn=form.username.value.toLowerCase();
if(!checkUserName(ssn)) return false;
if(strlen(form.password.value)<6 ||&n