<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>注册界面</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript" >
function userNameFocus(){
var uname=document.getElementById("uname").value;
if(uname=="请输入用户名"){
document.getElementById("uname").value="";
}
document.getElementById("uname").style.borderColor="#CC0000";
document.getElementById("uname").style.backgroundColor="#FFCC99";
}
function userNameBlur(){
var uname=document.getElementById("uname").value;
if(uname==""){
document.getElementById("uname").value="请输入用户名";
}
document.getElementById("uname").style.borderColor="";
document.getElementById("uname").style.backgroundColor="#FFFFFF";
}
function userPasswordFocus(){
document.getElementById("pwd1").style.borderColor="";
document.getElementById("pwd1").style.backgroundColor="#FFCC99";
}
function userPasswordBlur(){
document.getElementById("pwd1").style.borderColor="";
document.getElementById("pwd1").style.backgroundColor="#FFFFFF";
}
function userRePasswordFocus(){
document.getElementById("pwd2").style.borderColor="";
document.getElementById("pwd2").style.backgroundColor="#FFCC99";
}
function userRePasswordBlur(){
document.getElementById("pwd2").style.borderColor="";
document.getElementById("pwd2").style.backgroundColor="#FFFFFF";
}
function checkUserName(){
var uname=document.getElementById("uname").value;
if(uname==" "||uname=="请输入用户名"){
alert("请输入用户名");
return false;
}
return true;
}
function checkPassword(){
var pwd1=document.getElementById("pwd1");
var pwd2=document.getElementById("pwd2");
if(pwd1.value.length==0){
alert("密码不能为空!");
return false;
}
if(pwd1.value.length<6){
alert("密码长度大于等于6");
return false;
}
if(pwd1.value!=pwd2.value){
alert("密码不一致,请重新输入");
return false;
}
return true;
}
function xieyi(){
var xieyi = document.getElementById("xieyi");
if(xieyi.checked){
return true;
}
alert("请先确认协议通过!");
return false;
}
function checkAll(){
if(!checkUserName()){
return false;
}
if(!checkPassword()){
return false;
}
if(!xieyi()){
return false;
}
return true;
}
</script>
<style type="text/css">
<!--
.STYLE1 {
font-family: "方正舒体";
color: #FFFFFF;
font-size: x-large;
}
.STYLE2 {color: #66FF99}
-->
</style>
</head>
<body background="photos/back.jpg">
<span class="STYLE2"></span>
<div align="center" class="STYLE1" style="width:1400;">青岛风景网</div>
<div align="center" style="width:1400; ">
<form action="Index.html">
<table border="1" bgcolor="#FFFF66">
<tr>
<td colspan="2" align="center">欢迎注册</td>
</tr>
<tr>
<td width="100"><div align="center">用户名</div></td>
<td width="287"><input type="text" name="uname" id="uname" value="请输入用户名" onFocus="userNameFocus()" onBlur="userNameBlur()">
</td>
</tr>
<tr>
<td width="100"><div align="center">密 码</div></td>
<td><input type="password" name="pwd1" id="pwd1" onFocus="userPasswordFocus()" onBlur="userPasswordBlur()">
</td>
</tr>
<tr>
<td width="100"><div align="center">确认密码</div></td>
<td><input type="password" name="pwd2" id="pwd2" onFocus="userRePasswordFocus()" onBlur="userRePasswordBlur()">
</td>
</tr>
<tr>
<td width="100"><div align="center">性 别</div></td>
<td><input type="radio" value="1" name="sex" >
男
<input type="radio" value="0" name="sex" checked="checked">
女 </td>
</tr>
<tr>
<td width="100"><div align="center">籍 贯</div></td>
<td><select name="select" >
<option>青岛</option>
<option>上海</option>
<option>北京</option>
<option>大连</option>
</select>
</td>
</tr>
<tr>
<td width="100"><div align="center">爱 好</div></td>
<td><input type="checkbox" name="love" id="sport">
运动
<input type="checkbox" name="love" id="read" checked="checked">
读书
<input type="checkbox" name="love" id="art">
音乐
<input type="checkbox" name="love" id="chx">
美术 </td>
</tr>
<tr>
<td width="100"><div align="center">邮 箱</div></td>
<td><input name="text" type="text" width="15">
@qq.com </td>
</tr>
<tr>
<td width="100" height="179"><div align="center">自我介绍</div></td>
<td><textarea readonly="readonly" name="textarea" cols="38" rows="10">
</textarea>
<br/>
<input type="checkbox" name="xieyi" id="xieyi" >
确认 </td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submit" type="submit" onClick="return checkAll();" value="确认"/>
<input name="reset" type="reset" value="重置"/>
<input name="button" type="button" onClick="window.location.href='Index.html'" value="返回"/>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>