<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Input</title>
</head>
<body>
<!--action的值为数据发送的地址-->
<form action="">
账号:<input type="text" placeholder="请输入账号">
<br><br>
密码:<input type="password" placeholder="请输入密码">
<br><br>
性别:
<!--单选框以name属性进行分组,同一组单选框不能重复勾选,checked属性标记默认选项-->
<!--lable标签有两种写法-->
<input type="radio" name="Gender" id="man" checked> <label for="man">男</label>
<label><input type="radio" name="Gender">女</label>
<br><br>
籍贯:
<select name="" id="">
<option value="">北京</option>
<option value="">上海</option>
<option value="" selected>深圳</option>
</select>
<br><br>
兴趣:
<input type="checkbox" checked>下棋
<input type="checkbox">跑步
<input type="checkbox">踢球
<br><br>
<textarea name="" id="" placeholder="欢迎留下您的评论"></textarea>
<br><br>
<!--multiple属性为文件上传组件添加多选功能-->
附件:<input type="file" multiple>
<br><br>
<button type="submit">提交</button>
<button type="reset">重置</button>
<br><hr>
<button type="button">普通按钮</button>
<button disabled>无效按钮</button>
</form>
</body>
</html>
HTML表单标签
最新推荐文章于 2025-12-31 10:20:39 发布
8831

被折叠的 条评论
为什么被折叠?



