JSP fourth work (1)

Copy the code
<%@ 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>My JSP 'index.jsp' starting page</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>
  <%
  request.setCharacterEncoding("utf-8");
  String name=request.getParameter("txtUser");
  String Pass=request.getParameter("txtPass");
  String RPass=request.getParameter("txtRPass");
  String gen=request.getParameter("gen");
  String Email=request.getParameter("txtEmail");
   String year=request.getParameter("year");
    String month=request.getParameter("month");
     String day=request.getParameter("day");
   %>
   用户名:<% = name%> <br> 
  e-mail address: <% = Email%> <br>
  gender: <% = gen%> <br>
  密码:<%=Pass %><br>
  Confirm Password: <% = RPass%> <br>
  Date of birth: <% = year%> in <% = month%> May <% = day%> Japan <br> 
  </ body> 
</ HTML>
Copy the code
Copy the code
<%@ 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>My JSP 'index.jsp' starting page</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 action="index2.jsp" method="post" name="myform">
<TABLE   border="0" cellpadding="0" cellspacing="0" align="center" width="530">
  <TR>
    <TD height="108" colspan="2"><IMG src="images/top.jpg"></TD>
  </TR>
  <TR>
    <TD width="107" height="36">用户名:</TD>
    <TD width="524"> <INPUT name = "txtUser" type = "text" maxlength = "16"> only letters or numbers, characters 4-16 </ the TD> 
    <the TD width = "107" height = "36"> password: </ TD>
    <TR>
  </ TR>
    <TD width="524"><INPUT name="txtPass" type="password">密码长度6-12位</TD>
  </TR>
    <the TD width = "107" height = "36"> confirm password: </ TD>
    <TR>
    <TD width="524"><INPUT name="txtRPass" type="password"></TD>
  </TR>
    <TR>
    <TD width="107" height="36">性别:</TD>
    <TD width="524">
        <INPUT name="gen" type="radio"   value="男" checked>男  
        <INPUT name="gen" type="radio" value="女" class="input">女
    </TD>
  </TR>
    <TR>
    <TD width="117" height="36">E-mail address: </ TD> 
    <the TD width =" 524 ">
    <TD width = " 107 "height =" 36 "> date of birth: </ the TD>
    <TR>
  </ TR>
    Enter the correct Email address </ TD>
    <TD width = "524"> <the INPUT name = "txtEmail" of the type = "text">
    <INPUT name="year" id="year" size="4" maxlength="4" >&nbsp;年&nbsp;&nbsp;
           <SELECT name="month"  >
             <OPTION value=1>一月</OPTION>
             <OPTION value=2>二月</OPTION>
             <OPTION value=3>三月</OPTION>
             <OPTION value=4>四月</OPTION>
             <OPTION value=5>五月</OPTION>
             <OPTION value=6>六月</OPTION>
             <OPTION value=7>七月</OPTION>
             <OPTION value=8>八月</OPTION>
             <OPTION value=9>九月</OPTION>
             <OPTION value=10>十月</OPTION>
             <OPTION value=11>十一月</OPTION>
             <OPTION value=12>十二月 </OPTION>
          </SELECT>&nbsp;月&nbsp;&nbsp;
                <SELECT name="day"  >
             <OPTION value=1>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>
             <OPTION value=13>13</OPTION><OPTION value=14>14</OPTION><OPTION value=15>15</OPTION><OPTION value=16>16</OPTION>
             <OPTION value=17>17</OPTION><OPTION value=18>18</OPTION><OPTION value=19>19</OPTION><OPTION value=20>20</OPTION>
             <OPTION value=21>21</OPTION><OPTION value=22>22</OPTION><OPTION value=23>23</OPTION><OPTION value=24>24</OPTION>
             <The OPTION value = 25> 25 </ the OPTION> <the OPTION value = 26 is> 26 is </ the OPTION> <the OPTION value = 27> 27 </ the OPTION> <the OPTION value = 28> 28 </ the OPTION> 
             <the OPTION value = 29> 29 </ the OPTION> <the OPTION value = 30> 30 </ the OPTION> <the OPTION value =. 7> 31 is </ the OPTION> 
          </SELECT>&nbsp;日 
</TD>
  </ TR> 
  <TR> <the TD colspan = "2" align = left = "Center"> 
  <the INPUT type = "submit" value = "you agree to the following terms of the agreement and submit"> 
  </ TD> </ TR> 
  <TR> <TD colspan = "2"> 
  <TEXTAREA cols = "" rows = "" Readonly = "Readonly" style = "width: 480px; height: 110px; font-size: 12px; color: # 666"> 
I. General provisions 

1.1 users should agree to the terms of this agreement and to complete all registration procedures in accordance with the instructions on the page. The user during the registration process, click on the "consent" Button means that the user company reached an agreement with Baidu, fully accept all the terms under this Agreement. 
1.2 User registration is successful, Baidu will give each user a user account and corresponding password, the user ID and password from the user responsible for the custody; liable for all activities and events users should be on their user account carried out.
1.3 users can use Baidu for each channel individual services, when users use Baidu each individual service, the user's behavior as that of the individual service's Terms of Service and a variety of Baidu bulletin issued by the individual service agreement. 
1.4 Baidu Member Services Agreement and the terms of each individual service channels and notice at any time by the company Baidu update, without notice. When you use related services, 
  Before you use the services provided by Baidu, should carefully read the service agreement. If you do not agree that the Service Agreement and / or modify them at any time, you can cancel the service provided by Baidu; once you use Baidu services, it is deemed to have understand and fully agree with the contents of this service agreement, including on Baidu any changes made to the service agreement at any time, and become Baidu users. 
        </ TEXTAREA> 
  </ the TD> 
  </ TR> 
</ TABLE> 
</ the FORM> 
  </ body> 
</ HTML>

Guess you like

Origin www.cnblogs.com/mengjia0513/p/12633695.html