HTML高级标签之表单应用(一)

 表单应用包括登录表单, 单选框, 复选框, 下拉列表, 普通列表, 多选列表, 多行文本域

本章主要学习的是登录表单,单选框和复选框


代码示例:

<!DOCTYPE html>
<html>
<head>
<title>表单应用</title>

<meta charset="utf-8">
<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

</head>


<body>
	<table border="1" width="500" align="center">
		<form name="frm" action="login.php"> <!-- <form></form>标签用来创建表单. action属性: 设置接收和处理浏览器递交的标点内容的服务器就程序的URL -->
<a href="Main.html">返回主页</a> <a href="FormApplication2.html">表单的应用(二)</a>
			<caption><h1>表单的应用</h1></caption>

	<!-- 登录表单 -->
			<tr>
				<th>文本域(<u>U</u>)
				</th>
				<td><input type="text" name="username" value="username">
				</td>
			</tr>

			<tr>
				<th>密码域</th>
				<td><input type="text" name="password" value="password">
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
				<span style="white-space: pre">      </span><br>
				<input type="submit" name="sub">
				<span style="white-space: pre">          </span>
				<input type="reset"><br>
				<span style="white-space: pre"> </span>
				</td>
			</tr>
			
		<!-- 复选框表单 -->	
			<tr>
				<th>复选框</th>
				<td>
					运动<input type="checkbox">
					看书<input type="checkbox">
					听歌<input type="checkbox">
					吃饭<input type="checkbox">
				</td>
			</tr>
			
		<!-- 单选框表单 -->	
			<tr>
				<th>单选框</th>
				<td>
					<input type="radio" name="sex">男
					<input type="radio" name="sex">女
				</td>
			</tr>
		</form>
	</table>
</body>
</html>

运行结果:


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值