html常用表单元素学习

举例
html基础学习笔记

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			body {
				font-size: 12px;
			}
			table td {
				height: 24px;
				border: 1px solid #ccc;
			}
			table {
				border-collapse: collapse;
			}
		</style>
	</head>
	<body>
		<form action="11-图片.html" method="post">
			<table width="700" border="0" align="center">
				<thead>
					<tr>
						<td align="center" colspan="2">请填写以下资料</td>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td width="100" align="center">用户名</td>
						<td>
							<input type="text" name="username" id="username" value="" size="10" maxlength="6" />
						</td>
					</tr>
					<tr>
						<td width="100" align="center">密码</td>
						<td>
							<input type="password" name="userpwd" id="userpwd" value="" value="" size="10" maxlength="6"/>
						</td>
					</tr>
					<tr>
						<td width="100" align="center">自我介绍</td>
						<td>
							<textarea rows="10" cols="50" name="myinfo" id="myinfo">wo</textarea>
						</td>
					</tr>
					<tr>
						<td width="100" align="center">性别</td>
						<td>
							<input type="radio" name="sex" id="boy" value="boy" />
							<label for="boy"></label>
							<input type="radio" name="sex" id="girl" value="girl"/>
							<label for="girl"></label>
						</td>
					</tr>
					<tr>
						<td width="100" align="center">技能</td>
						<td>
							<input type="checkbox" name="skill" id="" value="java" checked=""/>java
							<input type="checkbox" name="skill" id="" value="oracle" />cracle
							<input type="checkbox" name="skill" id="" value="linux" checked=""/>linux
							<input type="checkbox" name="skill" id="" value="ssm" />ssm
						</td>
					</tr>
					<tr>
						<td width="100" align="center">城市</td>
						<td>
							<select name="city" id="city">
								<option value ="beijing">北京</option>
								<option value ="shanghai">上海</option>
								<option value ="guangzhou " selected="">广州</option>
								<option value ="shenzhen">深圳</option>
								<option value ="hangzhou">杭州</option>
							</select>
							
						</td>
					</tr>
					<tr>
						<td width="100" align="center">工作地点</td>
						<td>
							<select name="workcity" id="workcity" size="4" multiple="">
								<option value ="beijing">北京</option>
								<option value ="shanghai">上海</option>
								<option value ="guangzhou" selected="">广州</option>
								<option value ="shenzhen">深圳</option>
								<option value ="hangzhou">杭州</option>
							</select>
						</td>
					</tr>
					<tr>
						<td width="100" align="center">上传照片</td>
						<td>
							<input type="file" name="photo" id="photo" />
						</td>
					</tr>
					<tr>
						<td width="100" align="center">隐藏域</td>
						<td>
							<input type="hidden" value="1001" name="userId" id="userId" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center">
							<input type="submit" name="" id="" value="立即注册" />
							<input type="reset" name="" id="" />
							<input type="button" name="" id="" value="普通按钮" onclick="alert(234654);"/>
							<button>提交按钮</button>
							<button type="button">普通按钮</button>
						</td>
					</tr>
				</tbody>
			</table>
	</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值