jsp中的onsubmit事件不执行。。。?
本人初学,希望各位指点
以下是代码,点击submit按钮以后并没有调用userCheck()。。。为什么?
<%@ page language="java" pageEncoding="GBK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>登记注册表</title>
</head>
<body>
<script language="javascript" type="text/javascrip">
function userCheck(){
if(document.forml.username.value==""){
window.alert("请输入用户名");
return false;
}
if(document.forml.password.value==""){
window.alert("请输入密码");
return false;
}
if(document.forml.repassword.value==""){
window.alert("请输入密码确认");
return false;
}
if(document.forml.repassword.value!=document.formal.password.value){
window.alert("你输入的两次密码不相同");
return false;
}
if(document.forml.born.value==""){
window.alert("请输入出生日期");
return false;
}
if(document.forml.address.value==""){
window.alert("请输入用户地址");
return false;
}
if(document.forml.introduce.value==""){
window.alert("请输入自我介绍");
return false;
}
return true;
}
</script>
<form action="" method="post" name="forml" onsubmit="return userCheck()">
<table width="409" border="1">
<tr>
<td>用户名:</td> <td><input type="text" name="username"></td>
</tr>
<tr>
<td>密码:</td> <td><input type="password" name="password"></td>
</tr>
<tr>
<td>确认:</td> <td><input type="password" name="repassword"></td>
</tr>
<tr>
<td>性别:</td>
<td><input type="radio" name="sex" checked="checked" value="男">男
<input type="radio" name="sex" value="女">女
</td>
</tr>
<tr>
<td>出生:</td> <td><input type="text" name="born"></td>
</tr>
<tr>
<td>学历:</td>
<td><select name="schoolage" onchange="alert('您选择了'+schoolage.value)">
<option value="大专">大专</option>
<option value="本科">本科</option>
<option value="研究生">研究生</option>
<option value="博士生">博士生</option>
</select></td>
</tr>
<tr>
<td>地址:</td> <td><input type="text" name="address"></td>
</tr>
<tr>
<td>邮编:</td> <td><input type="text" name="post"></td>
</tr>
<tr>
<td>爱好:</td>
<td>
&l