<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>注册登陆页面</title>
<style>
#overall{
border:0px solid red;
width: 1755px;
height: 840px;
margin: auto;
}
#logo{
border:0px solid black;
width: 1755px;
height: 50px;
}
.top{
border:0px solid green;
width: 582px;
height: 50px;
float: left;
}
#top-3{
padding-left: 80px;
padding-top: 10px;
border:0px solid black;
width: 502px;
height: 40px;
}
#menu{
border:3px solid green;
width: 1755px;
height: 50px;
background: black;
}
ul li{
display: inline;
color: white;
}
#backgroundimg1{
border:0px solid red;
width: 100%;
height: 650px;
}
#Friendshiplink1 {
border:0px solid yellow;
width: 100%;
height: 100px;
text-align: center;
}
</style>
<script>
function CheckForm() {
// 1.获取数据,检验用户名
var uValue=document.getElementById("user").value;
if(uValue==""){
alert("username can't be empty!")
return false;
}
// 检验密码
var passValue=document.getElementById("password").value;
if(passValue==""){
alert("password can't be empty!")
return false;
}
//检验确认密码
var repassValue=document.getElementById("repassword").value;
if(repassValue==""){
alert("repassword can't be empty!")
return false;
}
//检验邮箱
// var eValue=document.getElementById("emaile").value;
// if(( /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/).test(eValue)){
// alert("邮箱格式不正确")
// return false;
// }
}
</script>
</head>
<body>
<div id="overall">
<!-- logo-->
<div id="logo">
<div class="top">
<img src="img/2.jpg" width="100%" height="100%">
</div>
<div class="top">
<img src="img/1.jpg" width="100%" height="100%">
</div>
<div class="top" id="top-3">
<a href="#">登陆</a>
<a href="#">注册</a>
<a href="#">退出</a>
</div>
</div>
<!-- 导航栏-->
<div id="menu">
<ul>
<a href="#"><li style="font-size: 20px">首页</li></a>
<a href="#"><li >生活用品</li></a>
<a href="#"><li >数码科技</li></a>
<a href="#"><li >孕婴保健</li></a>
<a href="#"><li >家用电器</li></a>
</ul>
</div>
<!-- 背景图片-->
<div id="backgroundimg1" >
<table border="0px" width="100%" style="background:url(img/5.jpg) no-repeat right center" >
<tr >
<td height="645px ">
<!-- 表单-->
<form action="#" method="get" name="reForm" onsubmit="return CheckForm()">
<table border="1px"width="750px" height="360px" align="center" cellpadding="0px" cellspacing="0px" bgcolor="white">
<tr height="40px">
<td colspan="2">
<font size="4">会员注册</font> <font size="4">USER REGISTER </font>
</td>
</tr>
<tr height="40px">
<td>用户名</td>
<td>
<span style="color: red ">*</span> <input type="text" name="user" id="user" placeholder="请输入用户名" size="34px"/>
</td>
</tr>
<tr>
<td>密码</td>
<td>
<span style="color: red ">*</span> <input type="password" name="password" id="password"/>
</td>
</tr>
<tr>
<td>确认密码</td>
<td>
<span style="color: red ">*</span> <input type="password" name="repassword" id="repassword" />
</td>
</tr>
<tr>
<td>Emaile</td>
<td>
<span style="color: white ">*</span> <input type="text" name="email" id="emaile"/>
</td>
</tr>
<tr>
<td>姓名</td>
<td>
<span style="color: white ">*</span> <input type="text" name="username" />
</td>
</tr>
<tr>
<td>性别</td>
<td>
<span style="color: white ">*</span> <input type="radio" name="sex" value="男" checked="checkedr"/>男
<input type="radio" name="sex" value="女"/>女
</td>
</tr>
<tr>
<td>出生日期</td>
<td>
<span style="color: white ">*</span> <input type="text" name="birthday" />
</td>
</tr>
<tr>
<td>验证码</td>
<td>
<span style="color: red ">*</span> <input type="text" name="yzm" />
<img src="img/4.jpg" width="100px" height="20px" align="center"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="注册" />
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
<!-- 友情链接-->
<div id="Friendshiplink1">
<ul style="align: center">
<a href="#"><li type="circle" style="color: #0000FF;">关于我们</li></a>
<a href="#"><li type="circle"style="color: #0000FF;">网页信息</li></a>
<a href="#"><li type="circle"style="color: #0000FF;">热情帮助</li></a>
<a href="#"><li type="circle"style="color: #0000FF;">电话手机</li></a>
</ul>
</div>
</div>
</body>
</html>
页面效果图:
图片放在一个文件夹中