表单标签、框架集frameset(Html基础)4

本文介绍了HTML的基础知识,包括表单元素如文本输入框、密码框、单选和复选框等,以及如何使用frameset标签创建框架集来同时展示多个网页。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Html基础</title>
	</head>
	<body>
		<!-- form表单
			action:提交地址
			method:提交方式get/post
			get:提交的数据会以name=value的形式用?拼接在网址的后面
			post:将数据放在请求体中,F12可以看见具体
			placeholder:输入表单的提示文字
			name:表单的名字
			value:表单的值
			type:表单的类型text、password
		 -->
		<form action="http://baidu.com" method="get">
			<!-- 文本输入框 -->
			<input type="text" value="" name="user" placeholder="输入用户名" />
			<!-- 密码输入框 -->
			<input type="password" value="" name="password"  placeholder="输入密码" />
			<!-- 单选框 -->
			<input type="radio" value="0" name="sex" /><input type="radio" value="1" name="sex" />
			<!-- 复选框 -->
			<input type="checkbox" value="0" nane="hobby"/><input type="checkbox" value="1" nane="hobby"/><input type="checkbox" value="2" nane="hobby"/>
			<!-- 文件选择框 -->
			<input type="file" name="file" />
			<!-- 下拉框 -->
			<select name="select">
				<option value="0">选项一</option>
				<option value="1">选项二</option>
				<option value="2">选项三</option>
			</select>
			<input type="button" value="普通按钮" />
			<input type="reset" value="重置按钮" />
			<input type="submit" value="提交按钮" />
		</form>
		
	</body>
</html>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Html基础</title>
	</head>
	<!-- 用frameset标签替换body标签(多个网页同时显示 框架集) -->
	<!-- 
		rows:把整个网页上下分
		cols:网页左右分
		frameborder:框架集的边框0|1
		noresize:能否调整窗口的大小
		scrolling:有无滚动条(yes、no、auto)
	 -->
	<frameset rows="500px,500px" cols="30%,30%,*" frameborder="0">
		<frame src="http://baidu.com" noresize="noresize" />
		<frame src="http://baidu.com" scrolling="yes" />
		<frame src="http://baidu.com" scrolling="no"/>
		<frame src="http://baidu.com" scrolling="auto"/>
		<frame src="http://baidu.com" />
		<frame src="http://baidu.com" />
	</frameset>
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值