HTML表单练习

 1 <%@ page language="java" contentType="text/html; charset=UTF-8"
 2     pageEncoding="UTF-8"%>
 3     <%@ page import="java.util.*" import="java.lang.*" import="java.io.*" %>
 4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 5 <html>
 6 <head>
 7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 8 <title>Insert title here</title>
 9 
10 </head>
11 <body>
12 
13     <h3 align="center" >石家庄铁道大学</h3>
14     <form name="my" method="post" action="" >
15         <table align="center"  border="2" background="1.jpg" >
16             <tr>
17                 <td><font color="red" face="黑体">姓名</font><input type="text"  name ="姓名" value=""><br/></td>
18             </tr>
19             <tr>
20                 <td>
21                     <font color="#156423" face="隶书" >性别</font><br>
22                     <input name ="xingbie" list="mylist">
23                     <datalist id="mylist" >
24                             <option value="男"></option>
25                             <option value="女"></option>
26                             <option value="空" selected>请选择性别</option>
27                     </datalist>
28                 </td>
29             </tr>
30         <tr>
31         <pre>
32             
33             <td>
34             <br>选择你喜欢吃的水果:
35                 <br><input type="radio" name="f" value="banana">香蕉
36                 <br><input type="radio" name="f" value="apple">苹果
37                 <br><input type="radio" name="f" value="pear">38                 <br>选择你喜欢的运动:
39                 <br><input type="checkbox" name="sport" value="pingpang">乒乓球
40                 <br><input type="checkbox" name="sport" value="basketball">篮球
41                 <br><input type="checkbox" name="sport" value="football">足球
42             </td>
43         </tr>
44         </pre>
45             <tr>
46                 <td>
47                     <br>出生年月:
48                     <!--multiple关键词多选-->
49                     <select name="birthday" >
50                         <option value="1998">1998
51                         <option value="1999">1999
52                          <option value="2000">2000
53                         <option value="2001" selected>2001
54                     </select>
55                 </td>
56             </tr>        
57         </table>
58     </form>
59 
60 </body>
61 </html>

 

posted @ 2020-11-04 21:32  靠谱杨  阅读(302)  评论(0编辑  收藏  举报