首页 > 代码库 > 表单综合运用

表单综合运用

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>阶段考试</title>
</head>
<body>
	<form action="index.php" method="post" enctype="application/x-www-form-urlencoded">
		<table border="1" align="center" width="300" cellspacing="0" cellpadding="8" style="border-collapse: collapse;">
			<tr>
				<th colspan="2">信息登记表</th>
			</tr>
			<tr align="center" bgcolor="#f0f0f0">
				<td>姓名</td>
				<td><input type="text" /></td>
			</tr>
			<tr align="center">
				<td>性别</td>
				<td><input type="radio" name="sex" value="http://www.mamicode.com/男" checked="checked" />男
					<input type="radio" name="sex" value="http://www.mamicode.com/女" />女
				</td>
			</tr>
			<tr align="center" bgcolor="#f0f0f0">
				<td>爱好</td>
				<td><input type="checkbox" name="hobby" value="http://www.mamicode.com/看电影" />看电影
					<input type="checkbox" name="hobby" value="http://www.mamicode.com/听音乐" checked="checked" />听音乐
					<input type="checkbox" name="hobby" value="http://www.mamicode.com/旅游" checked="checked" />旅游
				</td>
			</tr align="center">
			<tr align="center">
				<td>月薪</td>
				<td><input type="number" />元</td>
			</tr>
			<tr align="center" bgcolor="#f0f0f0">
				<td>国籍</td>
				<td>
					<select name="contry" id="contry">
						<option value="http://www.mamicode.com/中国" selected="selected">中国</option>
						<option value="http://www.mamicode.com/美国">美国</option>
						<option value="http://www.mamicode.com/日本">日本</option>
						<option value="http://www.mamicode.com/法国">法国</option>
						<option value="http://www.mamicode.com/英国">英国</option>
						<option value="http://www.mamicode.com/德国">德国</option>
					</select>
				</td>
			</tr>
			<tr align="center">
				<td>备注</td>
				<td>
					<textarea name="bz" id="bz" cols="20" rows="2"></textarea>
				</td>
			</tr>
			<tr align="center">
				<td colspan="2">
					<button>提交信息</button>
					<button type="reset">重置</button>
				</td>
			</tr>
		</table>
	</form>	
</body>
</html>

  

表单综合运用