标题:救急 救急
只看楼主
luke911
Rank: 1
等 级:新手上路
帖 子:66
专家分:0
注 册:2005-10-21
 问题点数:0 回复次数:0 
救急 救急

<%@ 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>用户名:
&nbsp;&nbsp;&nbsp;&nbsp<input type="text" name="username">
</td>
</tr>
<tr>
<td>密 码:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<input type="text" name="password1">
</td>
</tr>
<tr>
<td>密码确认:&nbsp;
<input type="text" name="password2">
</td>
</tr>
<tr>
<td>
<div align="center">
<input type="submit" name="Submit2" value="注册" onclick="return opinion()">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<input type="button" name="Submit" value="取消" onclick="users.jsp">
</div>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
为什么opinion()函数没有被调用啊?

搜索更多相关主题的帖子: html javascript function content Choice 
2005-10-31 16:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-32088-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.308363 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved