<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试</title>
</head>
<body>
<form id=cnwy name=cnwy onSubmit="return checkform()" action=123456789.asp method=get>
<input type="hidden" value="123" name="password" />
<script type="text/javascript">
<!--
function checkform() {
if( cnwy.password2.value =="" || cnwy.password2.value.length<1 || cnwy.password2.value.length>20) {
alert("请输入邀请码!")
return false;
}
if( cnwy.password.value != cnwy.password2.value ) {
alert("邀请码错误!")
return false;
}
return true;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++) {
TempChar= InString.substring (Count, Count+1);
if (RefString.indexOf (TempChar, 0)==-1)
return (false);
}
return (true);
}
// -->
</script>
<form
action="index2.asp" method="post" name="form1" id="form1" onSubmit="return CheckForm();">
邀请码:
<input style="font-size:16px"maxlength="20" size="5" name="password2" />
<input type="submit" value="确认">
</form>
<p> </p>
<p> </p>
<!---->
<script>
function jh(){
document.getElementById("div1").style.display="none";
document.getElementById("div2").style.display="";
}
</script>
<div id="div1">
<input type="button" onclick="jh()" value="提交" />
</div>
<div id="div2" style="display:none;">您已经提交成功</div>
<!---->
</body>
</html>