<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%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>?? ??? ?<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">?? ?-->?? ?<style type="text/css">?? ??? ?body {?? ??? ??? ?background-image: url(images/scenery.jpg);?? ??? ??? ?background-repeat: no-repeat;?? ??? ??? ?background-size: cover;?? ??? ?}?? ??? ?div {?? ??? ??? ?margin-top: 80px;?? ??? ?}?? ??? ?td,th? {?? ??? ??? ?border:1px dashed yellow;?? ??? ?}?? ?</style>?? ?<script type="text/javascript" src="js/Calendar3.js"></script>? <script type="text/javascript">?? ??? ?function reloadCode(){?? ??? ??? ?var time = new Date().getTime();?? ??? ??? ?alert("<%=path%>/ImageServlet?d="+time);?? ??? ??? ?alert(document.getElementById("imageCode").src);?? ??? ??? ?document.getElementById("imagecode").src="<%=request.getContextPath() %>/ImageServlet?d="+time;?? ??? ?}?? ?</script>? </head>? ? <body>? ??? ?<center><h1><font face="華文行楷" color="#ff0080" size="6">用戶免費注冊</font></h1></center><hr>? ??? ?<div>? ??? ??? ?<%-- <form action="<%=path%>/RegisterServlet" method="post"> --%>? ??? ??? ?<form action="<%=path%>/RegisterServlet" method="post">? ??? ??? ??? ?<table align="center" width="420" height="250" cellpadding="2" cellspacing="2" border="0">? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">用戶名</td>? ??? ??? ??? ??? ??? ?<td align="center"><input type="text" name="username" /></td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">密碼</td>? ??? ??? ??? ??? ??? ?<td align="center"><input type="password" name="password" /></td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">確認密碼</td>? ??? ??? ??? ??? ??? ?<td align="center"><input type="password" name="password2" /></td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">性別</td>? ??? ??? ??? ??? ??? ?<td align="center">? ??? ??? ??? ??? ??? ??? ?<input type="radio" name="gender" value="男" checked="checked"/>男? ??? ??? ??? ??? ??? ??? ?<input type="radio" name="gender" value="女"/>女? ??? ??? ??? ??? ??? ?</td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">注冊郵箱</td>? ??? ??? ??? ??? ??? ?<td align="center"><input type="text" name="email" /></td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">興趣愛好</td>? ??? ??? ??? ??? ??? ?<td align="center">? ??? ??? ??? ??? ??? ??? ?<input type="checkbox" name="interests" value="read"/>看書? ??? ??? ??? ??? ??? ??? ?<input type="checkbox" name="interests" value="online"/>上網? ??? ??? ??? ??? ??? ??? ?<input type="checkbox" name="interests" value="shopping"/>購物? ??? ??? ??? ??? ??? ??? ?<input type="checkbox" name="interests" value="programing"/>編程? ??? ??? ??? ??? ??? ?</td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">生日</td>? ??? ??? ??? ??? ??? ?<td align="center">? ??? ??? ??? ??? ??? ??? ?<input type="text" name="birthday" value="選擇日期" onclick="new Calendar().show(this);" readonly="readonly"/>? ??? ??? ??? ??? ??? ?</td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">是否接受條款</td>? ??? ??? ??? ??? ??? ?<td align="center">? ??? ??? ??? ??? ??? ??? ?<input type="radio" name="isAccept" value="接受" checked="checked"/>接受? ??? ??? ??? ??? ??? ??? ?<input type="radio" name="isAccept" value="不接受" />不接受? ??? ??? ??? ??? ??? ?</td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<td align="right">驗證碼</td>? ??? ??? ??? ??? ??? ?<td align="center">? ??? ??? ??? ??? ??? ??? ?<input type="text" name="checkCode" id="imageCode" size="6"/> ? ??? ??? ??? ??? ??? ??? ?<img alt="驗證碼" src="<%=path%>/ImageServlet"/> ? ??? ??? ??? ??? ??? ??? ?<a href="javascript: reloadCode();">看不清</a>? ??? ??? ??? ??? ??? ?</td>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<th colspan="2"> </th>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ??? ?<tr>? ??? ??? ??? ??? ??? ?<th colspan="2">? ??? ??? ??? ??? ??? ??? ?<input type="submit" name="submit" value="確認提交"/>? ??? ??? ??? ??? ??? ??? ?<input type="reset" name="reset" value="取消重置"/>? ??? ??? ??? ??? ??? ?</th>? ??? ??? ??? ??? ?</tr>? ??? ??? ??? ?</table>? ??? ??? ?</form>? ??? ?</div>? </body></html>
javascript:reloadCode()沒效果,刷新不了驗證碼,第一次會出現驗證碼,servlet的url-pattern:/ImageServlet
慕粉3169703
2016-11-29 19:46:48