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>
好看请赞,养成习惯:) 本文来自博客园,作者:靠谱杨, 转载请注明原文链接:https://www.cnblogs.com/rainbow-1/p/13971617.html
欢迎来我的51CTO博客主页踩一踩 我的51CTO博客
文章中的公众号名称可能有误,请统一搜索:靠谱杨的秘密基地