1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- /* input {
- width: 200px;
- height: 100px;
- } */
- </style>
- </head>
- <body>
- <!--
- form 表单
- 属性:action 讲表单上的内容提交到服务端 一般不去使用
- 1.input 输入框 行内块元素
- 属性:
- placeholder 提示信息
- value 值
- type类型
- text 文本
- password 密码
- submit 提交按钮
- reset 重置
- radio 单选框 必须保证name属性名字相同
- checkbox 复选框 disabled 禁用 checked选中
- 2.select与option共同组成下拉框
- 有多少可选项 就有多少option
- value属性 内容不显示在页面上 而是为了方便提交
- selected 默认选择
- disabled 禁止选择
- 3.textarea 文本域
- placeholder 提示信息
- rows 行数
- cols 列数
- maxlength 最大字符
- -->
- <form action="">
- <input type="text" placeholder="你好 星期日">
- <input type="text" placeholder="你好 星期日">
- <input type="text" placeholder="你好 星期日">
- <input type="password">
- <br>
- <br>
- <input type="submit">
- <input type="reset">
- <input type="button" value="哈哈">
- <br><br>
- <input type="radio" name="111">男
- <input type="radio" name="111">女
- <br><br>
- <input type="checkbox">篮球
- <input type="checkbox" disabled>足球
- <input type="checkbox">羽毛球
- <input type="checkbox" checked>排球
- <br><br>
- <select>
- <option disabled value="a">1</option>
- <option selected value="b">2</option>
- <option value="c">3</option>
- </select>
- <br><br>
- <textarea placeholder="请输入一段自我介绍" maxlength="10" rows="100" cols="200"></textarea>
- </form>
- </body>
- </html>
|