<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<script language="javascript">
function on_submit()
{
if(form1.username.value=="")
{
alert("用户名不能为空,请输入用户名!");
form1.username.focus();
return false;
}
if(form1.userpassword.value=="")
{
alert("用户密码不能为空,请输入密码!");
form1.username.focus();
return false;
}
if(form1.reuserpassword.value=="")
{
alert("用户确认密码不能为空,请输入密码!");
form1.reuserpassword.focus();
return false;
}
if(form1.userpassword.value!=form1.reuserpassword.value)
{
alert("密码与确认密码不同");
form1.userpassword.focus();
return false;
}
}
</script>
<script>
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<base href="<%=basePath%>">
<title>新用户注册</title>
<!--<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">-->
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<form method="post" action="register.jsp" name="form1" onsubmit="return on_submit()">
新用户注册<br>
用户名(*):<input type="text" name="username" size="20"><br>
密 码(*):<input type="password" name="password" size="20"><br>
再输一次密码(*):<input type="password" name="reuserpassword" size="20"><br>
性别:<input type="radio" value="男" checked name="sex">男
<input type="radio" name="sex" value="女">女<br>
出生年月:<input name="year" size="4" maxlength=4>年
<select name="month">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>月
<input name="day" size="3" maxlength=4>日
<br>
所在地: <select name="所在地">
<option>宁夏</option>
<option>北京</option>
<option>上海</option>
<option>贵州</option>
</select>
<br>
<!--电子邮件(*):<input name="E-mail" max-length="28"><br> -->
兴趣:<input type="checkbox" name="habit" value="">
看书
<input type="checkbox" name="habit" value="">
足球
<input type="checkbox" name="habit" value="">
旅游
<input type="checkbox" name="habit" value="">
唱歌
<input type="checkbox" name="habit" value="">
看电视
<input type="checkbox" name="habit" value="">
跳舞 <br>
<!-- 家庭住址:<input type="text" name="address" size="20"> -->
<textarea rows="10" cols="50"></textarea>
<br>
<input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"><br>
</form>
</body>
</html>