HTML表单综合知识总结案例

 <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*" import="java.lang.*" import="java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

</head>
<body>
    <h3 align="center" >石家庄铁道大学</h3>
    <form name="my" method="post" action="" >
        <table align="center"  border="2" background="1.jpg" >
            <tr>
                <td><font color="red" face="黑体">姓名</font><input type="text"  name ="姓名" value=""><br/></td>
            </tr>
            <tr>
                <td>
                    <font color="#156423" face="隶书" >性别</font><br>
                    <input name ="xingbie" list="mylist">
                    <datalist id="mylist" >
                            <option value="男"></option>
                            <option value="女"></option>
                            <option value="空" selected>请选择性别</option>
                    </datalist>
                </td>
            </tr>
        <tr>
            <td>
            <br>选择你喜欢吃的水果:
                <br><input type="radio" name="f" value="banana">香蕉
                <br><input type="radio" name="f" value="apple">苹果
                <br><input type="radio" name="f" value="pear"><br>选择你喜欢的运动:
                <br><input type="checkbox" name="sport" value="pingpang">乒乓球
                <br><input type="checkbox" name="sport" value="basketball">篮球
                <br><input type="checkbox" name="sport" value="football">足球
            </td>
        </tr>
            <tr>
                <td>
                    <br>出生年月:
                    <!-- multiple关键词多选 -->
                    <select name="birthday" >
                        <option value="1998">1998
                        <option value="1999">1999
                         <option value="2000">2000
                        <option value="2001" selected>2001
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <br>密码:
                    <br>
                    <input type="password" name="pass"> 
                </td>
            </tr>        
        </table>
    </form>

</body>
</html>

 

posted @ 2020-11-13 22:13  靠谱杨  阅读(84)  评论(0编辑  收藏  举报