|
@@ -0,0 +1,55 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+ <head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <title>表单</title>
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <!-- form 标签 => 表单
|
|
|
+ action 规定提交表单像提交处发送的表单数据
|
|
|
+ input 输入框 行内块元素
|
|
|
+ 属性:
|
|
|
+ 1.placeholder 默认的提示信息 颜色是灰色
|
|
|
+ 2.value 值
|
|
|
+ 3.type
|
|
|
+ text 文本(默认)输入框
|
|
|
+ button 按钮 (按钮名称可以自定义)
|
|
|
+ submit 提交按钮
|
|
|
+ reset 重置按钮
|
|
|
+ radio 单选框 注意:name值必须相同才生效
|
|
|
+ checkbox 复选框(多选框)disabled 禁止选择 checked 选中状态
|
|
|
+ password 密码
|
|
|
+ -->
|
|
|
+ <form action="">
|
|
|
+ <input type="text" placeholder="请输入您的电话号码" value="1212">
|
|
|
+ <input type="submit">
|
|
|
+ <input type="reset">
|
|
|
+ <input type="radio" name="same">男
|
|
|
+ <input type="radio" name="same">女
|
|
|
+ <input type="checkbox" disabled>音乐
|
|
|
+ <input type="checkbox" checked>美术
|
|
|
+ <input type="checkbox">跳舞
|
|
|
+ <input type="checkbox">口才
|
|
|
+ <input type="password">
|
|
|
+ <!-- 下拉框
|
|
|
+ select 表单中的控件
|
|
|
+ option 表单中的选项
|
|
|
+ select 和 option 共同组成下拉框 缺一不可
|
|
|
+ selected 默认选中
|
|
|
+ disabled 禁止选中
|
|
|
+ -->
|
|
|
+ <select>
|
|
|
+ <option value="1">1</option>
|
|
|
+ <option value="2" selected>2</option>
|
|
|
+ <option value="3" disabled>3</option>
|
|
|
+ <option value="4">4</option>
|
|
|
+ </select>
|
|
|
+ <!-- 文本域 textarea
|
|
|
+ rows 行
|
|
|
+ cols 列
|
|
|
+ maxlength 可以输入的最大长度
|
|
|
+ -->
|
|
|
+ <textarea cols="15" rows="8" maxlength="10"></textarea>
|
|
|
+ </form>
|
|
|
+ </body>
|
|
|
+</html>
|