表单相关

表单相关

a. 表单信息分组
  <audio id="music" src="sucai/wuji.mp3" controls loop></audio>
  <!-- disabled 禁用整组表单元素--> <fieldset disabled>
<legend>
分组标题
    </legend>
</fieldset>
b. 新增输入框类型

 email 邮箱 提交时对输入的内容进行邮箱格式验证,允许空值提交 url 网址 需添加网址协议,如:http或者https
number 数字类型 整数
tel 手机号 移动端生效
color 调色板 收集的数据是16进制表示的颜色方式 date 日期控件
month 月份控件 选择月份
week 周控件 选择 一年中的多少周
time 时间控件 选择一天中的时间
  邮箱类型:<input type="email" name=""> 网址类型:<input type="url" name=""> number:<input type="number" name=""> tel:<input type="tel" name=""> color:<input type="color" name="color"> date:<input type="date" name=""> month:<input type="month" name=""> week:<input type="week" name=""> time:<input type="time" name="">
c. 新增属性
palceholder 设置输入框的提示信息
readonly 设置为只读属性
required 设置为必填
pattern 限制输入的值需满足该属性设置的正则表达式 待调试 multiple 允许一个以上的值 常用于多文件上传
autofocus 文档准备完成,自动获得焦点
d. 新增标签
label 为 input 元素定义标注
datalist 定义选项列表
  性别:<label>
<input type="radio" name="sex"> 男
</label>
<input type="radio" name="sex" id="female"><label for="female">女</label>
  <input type="text" name="province" list="province">
<datalist id="province">
<option>北京</option> <option>天津</option> <option>河北</option>
</datalist>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值