注册页面+验证

<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>注册用户界面</title>
<style>
.s1 {
color: red;

}
body{

}
</style>
<link type="text/css" rel="stylesheet" href="./js/calendar.css">
<script type="text/javascript" src="./js/calendar.js"></script>
<script type="text/javascript" src="./js/calendar-zh.js"></script>
<script type="text/javascript" src="./js/calendar-setup.js"></script>
<script type="text/javascript" src="./js/check.js" > </script>
<script type="text/javascript" src="./js/check_idNo.js" > </script>

</head>

<body >
<form name="f1" action="./regist.do" method="post" onsubmit="return check_form();">
<div style="border: 1px solid #398643;background-color:#f4f4f4">
<div style="padding-left:530px;padding-top:40px;color:red;font-size:35">
<img src="./js/images/register.jpg">&nbsp;&nbsp;<img src="./js/images/regiter_word.jpg">
</div>
<table style="margin:0 auto;" >
<tr>
<td>
姓名
</td>
<td>
<input id="name" name="name" onblur="check_name();" onfocus="clear_nameMsg();">
<span id="name_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td>
性别
</td>
<td>
<input type="radio" id="sex" name="sex" value="男" />

<input type="radio" id="sex" name="sex" value="女" checked=checked"/>

</td>
</tr>
<tr>
<td>
出生日期
</td>
<td>
<input type="text" id="birthday" name="birthday"  onfocus="clear_birthdayMsg()" onblur="check_birthday();" onclick="return showCalendar('birthday', 'y-mm-dd');"/>

    <input type="button" style="background:url(./js/images/calendar1.jpg) " onclick="return showCalendar('birthday', 'y-mm-dd');">
     <span id="birthday_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td>
证件类型
</td>
<td>
<select name="idType" id="idType">
<option value="身份证" >
身份证
</option>
<option value="军官证" >
军官证
</option>
<option value="护 照" >
护 照
</option>
<option value="其 他" >
其 他
</option>
</select>
</td>
</tr>
<tr>
<td>
证件号码
</td>
<td>
<input id="idNo" name="idNo" onblur="check_idNo();" onfocus="clear_idNoMsg();">
<span id="idNo_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td>
联系地址
</td>
<td>
<input id="address" name="address" onblur="check_address();" onfocus="clear_addressMsg();">
<span id="address_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td>
邮编
</td>
<td>
<input id="zipcode" name="zipcode" onblur="check_zipcode();" onfocus="clear_zipcodeMsg();">
<span id="zipcode_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td>
电话号码
</td>
<td>
<input id="phone" name="phone" onblur="check_phone();" onfocus="clear_phoneMsg();">
<span id="phone_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td>
电子邮件
</td>


<td>
<input id="email" name="email" onblur="check_email();" onfocus="clear_emailMsg();">
<span id="email_msg" class="s1">*</span>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="确定" >
</td>
</tr>

</table>
</div>
    </form>
</body>
</html>

你可能感兴趣的:(JavaScript,java,html)