标签
<form><form> 标签 表单创建
<input></input> 标签创建表单
<select></select> 标签为选择
<option></option> 标签 下拉菜单选择
标签空格
<textarea></textarea> 标签文本区域
属性
<form action="789.html"> action 按钮提交链接
<input type="text" value="123456"> value="123456" 属性为数据取值
<input type="radio"> type="radio" 属性为选项,需使用name属性才能使radio选项相互排斥
name="sex" 使用2个相同的name属性能radio使选项排斥选择
<input type="file"> 属性为文件域
<input type="checkbox"> 属性 多行选项
<input type="button" 普通按钮
<input type="submit" 提交按钮
<input type="reset" 重置按钮
<textarea rows="10" > 属性 行
<textarea cols="30"> 属性 列
html表单创建2.html
(1.84 KB, 下载次数: 0, 售价: 10 圆)
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <!---
- 标签
- <form><form> 标签 表单创建
- <input></input> 标签创建表单
- <select></select> 标签为选择
- <option></option> 标签 下拉菜单选择
- 标签空格
- <textarea></textarea> 标签文本区域
- 属性
- <form action="789.html"> action 按钮提交链接
- <input type="text" value="123456"> value="123456" 属性为数据取值
- <input type="radio"> type="radio" 属性为选项,需使用name属性才能使radio选项相互排斥
- name="sex" 使用2个相同的name属性能radio使选项排斥选择
- <input type="file"> 属性为文件域
- <input type="checkbox"> 属性 多行选项
- <input type="button" 普通按钮
- <input type="submit" 提交按钮
- <input type="reset" 重置按钮
- <textarea rows="10" > 属性 行
- <textarea cols="30"> 属性 列
- -->
- </head>
- <body>
- <form action="789.html">
- 用户名:<input type="text" value="123456"><br />
- 密 码:<input type="password"><br />
- 性别:<input type="radio" name="sex">男 <input type="radio" name="sex">女<br />
- 头像:<input type="file"><br/>
- 爱好:<input type="checkbox">吃
- <input type="checkbox">喝
- <input type="checkbox">玩<br />
- 学历: <select>
- <option value="1">小学</option>
- <option value="2">初中</option>
- <option value="3">高中</option>
- <option value="4">大学</option>
- 简介:<textarea rows="10" cols="30"></textarea><br />
- </select>
- <input type="button" value="普通按钮" />
- <input type="submit" value="提交按钮" />
- <input type="reset" value="重置按钮" />
- </form>
- </body>
- </html>
复制代码
|