<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<script>
function check(){
if(document.form1.uname.value == "") {
alert("用户名不能为空!!!");
return false;
}
if(document.getElementById("textfield2").value == "") {
alert("密码不能为空!!!");
return false;
}
if(document.getElementById("textfield3").value == "") {
alert("重复密码不能为空!!!");
return false;
}
if(document.getElementById("textfield2").value != document.getElementById("textfield3").value) {
alert("两次密码不一致!!!");
return false;
}
alert("注册成功!!!");
}
</script>
<body>
<div id="apDiv">
<div id="apDiv1">
<div align="center" class="STYLE1">校园BBS系统</div>
</div>
<div class="STYLE4" id="apDiv2">
您尚未
<a href="#" target="_blank">登录</a>
<a href="#" target="_blank">注册</a>
</div>
<div id="apDiv3">
<span>
>><a href="#">论坛首页</a>
</span>
</div>
<div id="apDiv5">
<form id="form1" name="form1" method="post" action="">
<table width="100%" height="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<span class="body">用 户 名:</span>
</td>
<td align="left">
<label>
<input name="uname" type="text" id="textfield1" />
</label>
</td>
</tr>
<tr>
<td align="right">
<span class="body">密 码:</span>
</td>
<td align="left">
<label>
<input name="upass" type="password" id="textfield2" />
</label>
</td>
</tr>
<tr>
<td align="right">
<span class="body">重复密码:</span>
</td>
<td align="left">
<label>
<input name="upass2" type="password" id="textfield3" />
</label>
</td>
</tr>
<tr>
<td align="right">
<span class="body">性 别:</span>
</td>
<td align="left">
<label>
男<input type="radio" name="usex" id="uman" />
女<input type="radio" name="usex" id="uwoman" />
</label>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<span>请选择头像</span>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<label for="head1">
<img src="img/1.jpg"/>
</label>
<input type="radio" name="uhead" id="head1"/>
<label for="head2">
<img src="img/2.jpg"/>
</label>
<input type="radio" name="uhead" id="head2"/>
<label for="head3">
<img src="img/3.jpg"/>
</label>
<input type="radio" name="uhead" id="head3"/>
<label for="head4">
<img src="img/4.jpg"/>
</label>
<input type="radio" name="uhead" id="head4"/>
<label for="head5">
<img src="img/5.jpg"/>
</label>
<input type="radio" name="uhead" id="head5"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<label for="head6">
<img src="img/6.jpg"/>
</label>
<input type="radio" name="uhead" id="head6"/>
<label for="head7">
<img src="img/7.jpg"/>
</label>
<input type="radio" name="uhead" id="head7"/>
<label for="head8">
<img src="img/8.jpg"/>
</label>
<input type="radio" name="uhead" id="head8"/>
<label for="head9">
<img src="img/9.jpg"/>
</label>
<input type="radio" name="uhead" id="head9"/>
<label for="head10">
<img src="img/10.jpg"/>
</label>
<input type="radio" name="uhead" id="head10"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<label for="head11">
<img src="img/11.jpg"/>
</label>
<input type="radio" name="uhead" id="head11"/>
<label for="head12">
<img src="img/12.jpg"/>
</label>
<input type="radio" name="uhead" id="head12"/>
<label for="head13">
<img src="img/13.jpg"/>
</label>
<input type="radio" name="uhead" id="head13"/>
<label for="head14">
<img src="img/14.jpg"/>
</label>
<input type="radio" name="uhead" id="head14"/>
<label for="head15">
<img src="img/15.jpg"/>
</label>
<input type="radio" name="uhead" id="head15"/>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<label>
<input type="submit" name="button" id="button" value="注册" onclick="check();"/>
</label>
</td>
</tr>
</table>
</form>
</div>
</div>
</body>
<style type="text/css">
#apDiv{
width: 50%;
margin-left: 25%;
}
#apDiv1{
top: 1px;
height: 50px;
/*z-index: 1;*/
}
#apDiv2{
top: 51px;
height: 25px;
background-color: #e0f0f9;
}
#apDiv3{
margin-top: 10px;
}
#apDiv4{
margin-top: 10px;
}
#apDiv5{
top: 76px;
border: 1px solid lightgrey;
}
a{
font-size: 16px;
font-family: "微软雅黑";
}
th{
font-family: "微软雅黑";
font-size: 20px;
}
td{
width: 50%;
}
/*span{
font-family: "微软雅黑";
}*/
.STYLE1{
font-family: "微软雅黑";
font-weight: bold;
font-size: 36px;
color: #3399CC;
}
.STYLE3{
font-family: "微软雅黑";
color: #3399CC;
}
.STYLE4{
line-height: 25px;
color: #004c7d;
font-size: 16px;
}
</style>
</html>