Html表单

表单的常用属性

在这里插入图片描述

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>表单</title>
	</head>
	<body>
		<!-- 表单标签form -->
		<form action="" method="">
			名字:<input type="text" size="12"/><br/>
			姓氏:<input type="text" size="12"/><br/>
			登录名:<input type="text" size="12"/>(可包含0-9和下划线)<br/>
			密码:<input type="password" size="12" /><br>
			再次输入密码:<input type="text" size="12"/><br>
			电子邮箱:<input type="text" size="12"/><br>
			性别:<input type="radio" name="sex" /><input type="radio" name="sex" /><br>
			爱好:<input type="checkbox" name="hobby" />运动
				 <input type="checkbox" name="hobby" />聊天
				 <input type="checkbox" name="hobby" />打游戏
				 <input type="checkbox" name="hobby" /><br>
			户籍地:<select>
						<option >吉林省</option>
						<option >辽宁省</option>
						<option >湖北省</option>
				   </select><br>
			自我介绍:<textarea rows="5" cols="4">
					 </textarea><br>
			选择文件:<input type="file"/><br>
			<input type="submit" value="提交"/>
			<input type="reset" value="重置" />
		</form>
	</body>
</html>

在这里插入图片描述

表单的高级用法

在这里插入图片描述

表单的练习

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>练习</title>
	</head>
	<body>
		<h2>申请表</h2>
		<form action="" method="">
			姓名:<input type="text" size="12"/><br>
			密码:<input type="password" size="12" /><br>
			照片:<input type="file" size="12"/><br>
			感兴趣的职位:
				<input type="radio" name="ha" />Web设计
				<input type="radio" name="ha" />Web开发<br>
			向往的城市:
				<select>
					<option>北京</option>
					<option>上海</option>
				</select><br>
			协议:<br><textarea readonly="readonly" rows="5" cols="10">求职信息必须真实准确</textarea><br>
			<input type="checkbox" />我认真阅读并接受以上协议。
			经验:
				<select>
					<option>1</option>
					<option>2</option>
				</select><br>
			<input type="submit" disabled="disabled" value="提交"/>
			<input type="reset"  value="重置" />
		</form>
	</body>
</html>

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值