1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- </head>
- <body>
- <!-- 表单
- form 表单
- 属性:action 将表单信息提交到表单发送处(很少使用)
- label 存放文本信息
- input 输入框
- 属性:type类型 placeholder 提示信息
- 1.text 文本
- 2.password 密码
- 3.radio 单选 name值相同
- 4.checkbox 多选 disabled禁止选中 checked默认选中
- 5.submit 提交按钮
- 6.reset 重置按钮
- 7.button 按钮 value控制按钮名称
- -->
- <form action="">
- <label>账号:</label>
- <input type="text" placeholder="请输入账号">
- <br><br>
- <label>密码:</label>
- <input type="password" placeholder="请输入密码">
- <!-- <br><br> -->
- <label>性别:</label>
- <input type="radio" name="aa">男
- <input type="radio" name="aa">女
- <br>
- <label>喜好:</label>
- <input type="checkbox">画画
- <input type="checkbox" disabled>篮球
- <input type="checkbox" checked>声乐
- <input type="checkbox">书法
- <br>
- <input type="submit">
- <input type="reset">
- <input type="button" value="自定义">
- <br>
- <br>
- <!--
- 行内块元素:行内块元素一行展示时,会产生空白间隙
- img input
- -->
- <input style="background: #00f;width: 100px;" type="text" placeholder="请输入账号">
- <input style="background: #00f;" type="text" placeholder="请输入账号">
- <!-- 下拉框
- select与option一起组成
- selected 默认选择
- disabled 禁止选中
- -->
- <select>
- <option value="1" disabled>内容一内容一内容一内容一</option>
- <option value="2" selected>2</option>
- <option value="3">3</option>
- </select>
- <!--
- 文本域 textarea
- rows 行
- cols 列
- maxlength 最大长度
- -->
- <textarea rows="10" cols="10" maxlength="20"></textarea>
- </form>
- </body>
- </html>
|