<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script language="javascript">
function Choice(strUrl){
parent.parent.mainFrame.location.href=strUrl;
//parent.Main.window.location.href=strUrl;
}
</script>
<script language="javascript">
function opinion()
{
if(form1.password1.value!=""&&form1.password1.value!=""&&form1.username.value!="")
{
if(form1.password1.value==form1.password2.value){
return true;
}else{
alter("两次密码输入不一致,请重新输入");
return false;
}
else{
alter("用户名和密码不能为空");
return false;
}
}
</script>
<body>
<div align="center">
<form name="form1" method="post" action="addsuc.jsp">
<table width="32%" border="1">
<tr>
<td><div align="center">用户注册</div></td>
</tr>
<tr>
<td>用户名:
 <input type="text" name="username">
</td>
</tr>
<tr>
<td>密 码:
 <input type="text" name="password1">
</td>
</tr>
<tr>
<td>密码确认:
<input type="text" name="password2">
</td>
</tr>
<tr>
<td>
<div align="center">
<input type="submit" name="Submit2" value="注册" onclick="return opinion()">
<input type="button" name="Submit" value="取消" onclick="users.jsp">
</div>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
为什么opinion()函数没有被调用啊?