📄 index.jsp
字号:
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="org.sunxin.lesson.jsp.util.TokenProcessor" %>
<html>
<head>
<title>登录页面</title>
<script language="javascript">
<!--
var checkSubmitFlg=true;
function checkSubmit()
{
if(true==checkSubmitFlg)
{
document.theForm.submit();
checkSubmitFlg=false;
}
else
{
alert("你已经提交了表单,请不要重复提交!");
}
}
//-->
</script>
</head>
<body>
<%
TokenProcessor processor=TokenProcessor.getInstance();
String token=processor.getToken(request);
%>
<form method="post" action="handler" name="theForm">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>邮件地址:</td>
<td>
<input type="text" name="email">
<input type="hidden" name="org.sunxin.token" value="<%=token%>"/>
</td>
</tr>
<tr>
<td><input type="reset" value="重填"></td>
<td><input type="button" name="btnSubmit" value="提交" onClick="checkSubmit();"/></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -