87,992
社区成员
发帖
与我相关
我的任务
分享
<!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>
<title>用户注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="新建文本文档.txt" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #F6F6F6;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.STYLE1 {font-family: "楷体"}
body,td,th {
font-family: 楷体;
}
-->
</style>
<script type="text/javascript">
function checkform()
{
var username = document.getElementById('username').value;
var pwd1 = document.getElementById('password').value;
var pwd2 = document.getElementById('password2').value;
var an = document.getElementById('anniu').checked;
var x=1;
if(an=="")
{
alert("请阅读用户协议")
return false;
}
if(username == '' || pwd1 == '' || pwd2 == '')
{
alert("请填写必填项");
return false;
}
var reg = /^(\d|\w|\d\w){6,16}$/;
if(reg.test(username) == false){
alert("用户名格式不对");
return false;
}
if(reg.test(pwd1) == false){
alert("密码格式不对");
return false;
}
if(pwd1 != pwd2){
alert("两次密码不一致");
return false;
}
if(x==1)
{
alert("注册成功");
}
}
</script></head>
<body>
<div style="position:absolute; margin-left:70%; margin-top:4%; left: 10px; top: 76px;">
<p>有帐号?直接<a href="e">登录</a></p>
</div>
<form method="post" name="form1" id="form1" onsubmit="return checkform()">
<div class="STYLE1" style="margin-top:10%;margin-left:20%; width:60%; background-color:#FFFFFF; color: #353535 ">
<table width="650" border="0" cellpadding="8" class="STYLE1">
<tr>
<td height="82" colspan="3" class="HeaderColor"> <h4 align="left">
欢迎注册
</h4>
<hr />
<h4 align="right"> </h4></td>
</tr>
<tr style="vertical-align: top">
<td width="335" class="LabelColor" style="text-align: right">
<label for="username"> *帐号 </label></td>
<td width="388" colspan="2" class="TitleColor">
<div align="left">
<input name="username" type="text" id="username" size="25" maxlength="20" style="color:#ccc" value="输入6-16个字符" onfocus="this.value='',this.style.color='#000000'" />
</div></td>
</tr>
<tr style="vertical-align: top">
<td width="335" class="LabelColor" style="text-align: right">
<label for="password">
<div align="right">*密码</div>
</label>
</td>
<td colspan="2" class="TitleColor">
<div align="left">
<input name="textfield2" type="text" id="password" size="25" maxlength="16"style="color:#ccc" value="输入6-16位字符" onfocus="this.value='',this.style.color='#000000'" />
</div>
</td>
</tr>
<tr style="vertical-align: top">
<td width="335" height="32" class="LabelColor" style="text-align: right">
<label for="confirmpassword">
<div align="right">*再次输入密码</div>
</label>
</td>
<td colspan="2" class="TitleColor">
<div align="left">
<input name="textfield3" type="text" id="password2" size="25" maxlength="16" style="color:#ccc" value="输入6-16位字符" onfocus="this.value='',this.style.color='#000000'"/>
</div>
</tr>
<tr style="vertical-align: top">
<td style="text-align: right" class="LabelColor"><label for="confirmpassword">
<div align="right">
<input type="checkbox" name="radiobutton" value="radiobutton" id="anniu" />
</div>
</td>
<td colspan="2" class="TitleColor"><label>
<div align="left">我已阅读<a href="民大益易用户协议书.txt">《民大益易用户协议书》</a></div>
</label>
</td>
</tr>
<tr style="vertical-align: top" class="FooterColor">
<td colspan="3">
<div align="center">
<input name="SubmitName" type="submit" id="cg" style="width:190px; height:40px; background-color: #FF3300" value="立即注册" onclick="" />
</div></td>
</tr>
</table>
</div>
</form>
</body>
</html>
