?? 04_14.jsp
字號:
<html>
<head>
<title>show form</title>
</head>
<%@ page contentType="text/html;charset=GB2312" %>
<body>
<font color=blue size="4">
以下是你提交的內容:
</font>
</h3>
<%
//得到提交的表單數據
String username=request.getParameter("username");
String password=request.getParameter("password");
String birthyear=request.getParameter("birthyear");
boolean flag=true;
//輸出提交信息
out.println("<p>UserName:"+username+"<br>");
out.println("PassWord:"+password+"<br>");
out.println("BirthYear:"+birthyear+"<br></p>");
//驗證提交的username和password的長度是否符合要求
if(username.length()<3||username.length()>8)
flag=false;
if(password.length()<6||password.length()>14)
flag=false;
//返回驗證信息
out.println("<font color=blue size=4>");
if(flag) out.println("你所提交的數據的長度符合我們的要求。");
else out.println("你所提交的數據的長度不符合我們的要求。");
out.println("</font>");
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -