h5新增-2

表单

  • keygen(定义生成秘钥)
  • datalist(定义下拉列表)
  • output <output> 定义输入的类型

H5智能表单

input 新增 type值

  • email(匹配邮箱地址)

  • url(必须输入url地址(加http://))

  • number(输入值必须是数字)

  • min
    指定最小值

  • max
    指定最大值

  • step
    指定跳跃范围(和范围有关)

  • range(取值范围)

    • min
      指定最小值
    • max
      指定最大值
    • step
      指定跳跃范围(和范围有关)
    • value
      默认值
  • tel

    • 用于电话号,因为存在 - 等字符,所以等同于text 但是用移动设备,会直接弹出数字键盘
  • search(效果和text一样,专用于搜索框)

    • 属性 results
  • color(调出取色面板)

  • date(选取 日 月 年)

  • month(选取月年)

  • week(选取周和年)

  • time(选取时间,小时和分钟)

  • datetime(选取utc时间,日月年)

  • datetime-lcoal(选取本地时间,日月年)

Form元素 新增的 属性

  • autocomplete(自动完成,可以设置为 on/off)
  • novalidate( 不进行验证)

表单控件新增的属性

  • pattern(正则表达式验证) input/textarea
  • placeholder input/textarea
  • autofocus(自动获取焦点)
  • autocomplete(自动完成,可以设置为 on/off) off/on
  • required(必填项目,不输入不能提交)

提交按钮 新增属性

  • formaction
  • formmethod
  • formtarget
  • formectype
  • formautocomplte
  • formnovalidate

H5新增全局属性

  • contenteditalbe 是否可编辑 true/false
  • contextmenu(contextmenu 规定元素的上下文菜单。上下文菜单在用户点击元素时显示。 指有Firefox可用)
  • spellcheck 是否语法检查 true/false
  • draggable 是否拖动 true/false
  • dropzome dropzone 规定在拖动被拖动数据时是否进行复制、移动或链接。
  • translate 是否翻译 yes/no
  • hidden 隐藏 不需要值
  • data-* data-* 用于存储页面或应用程序的私有定制数据。

条件注释(IE9以及IE9 以下浏览器 可以识别)

基础运算符

  • lt 小于
  • gt 大于
  • lte 小于等于
  • gte 大于等于
  • ! 不等于

用法

<!--[if 运算符 IE 版本]>
<![endif]-->
例子:
1.<!--[if gt IE 8]>仅IE 8以上可见<![endif]—>
2. <!--[if lt IE 8]>仅IE 8以下可见<![endif]—>
3.  <!--[if gte IE 8]>IE 8及以上可见<![endif]—>
4.   <!--[if lte IE 8]>IE 8及以下可见<![endif]—>
5.    <!--[if !IE 8]>非IE 8的IE可见<![endif]-->
6.    <!--[if IE 8]> 仅IE8可见 <![endif]--> 
7.    <!--[if !IE]><!--> 您使用不是 Internet Explorer <!--<![endif]-->

posted on 2017-08-02 21:14  溢流谦  阅读(138)  评论(0编辑  收藏  举报

导航