<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="" method="get">
<p>名字: <input type="text" name="username"></p>
<p>密码: <input type="password" name="pwd"></p>
<!--单选框标签-->
<p>性别:
<input type="radio" value="boy" name="sex" checked/>男
<input type="radio" value="girl" name="sex"/>女
</p>
<p>多选:
<input type="checkbox" value="sleep" name="hobby"> 睡觉
<input type="checkbox" value="girl" name="hobby"> 女人
<input type="checkbox" value="chat" name="hobby"> 聊天
<input type="checkbox" value="game" name="hobby"> 游戏
</p>
<p>按钮:
<input type="button" name="" value="单机">
</p>
<p>下拉列表框:
<select name="列表名称">
<option value="china">中国</option>
<option value="us">美国</option>
<option value="yindu" selected>印度国</option>
<option eth>瑞士</option>
</select>
</p>
<p>文本域:
<textarea name="textarea" cols="50" rows="10">文本内容</textarea>
</p>
<p>文件域
<input type="file" name="files">
<input type="button" value="上传" name="upload">
</p>
<p>邮箱验证:
<input type="email" name="email">
</p>
<p>URL:
<input type="url" name="url">
</p>
<p>数字:
<input type="number" name="num" max="100" min="0" step="1" value="3">
</p>
<p>滑块:
<input type="range" name="voice" min="0" max="1000" step="10">
</p>
<p>搜索框:
<input type="search" name="search">
</p>
<p>增强鼠标可用性:
<label for="aa">你点我试试</label>
<input type="text" id="aa">
</p>
<p>提交:
<input type="submit">
</p>
<p>清空:
<input type="reset" value="清空">
</p>
</form>
</body>
</html>
html中常见的表单标签
猜你喜欢
转载自blog.csdn.net/qq_40084325/article/details/113699652
今日推荐
周排行