HTML5全局属性

1.<label hidden>看得见吗</label>

  //hidden为隐藏属性

2. <input tabindex="1" />
    <textarea tabindex="2"  spellcheck="true"  cols="60" rows="5"></textarea>

  //spellcheck检查是否有拼写错误(但很奇怪亲测只在谷歌上可以,谷歌上写不写这一句都可以,其他浏览器都不行)

  //tabindex表示用Tab键的切换顺序

3.<p contenteditable="true">哈哈哈哈哈</p>
   <table contenteditable="true">
    <tr>
     <td>书记</td>
    </tr>    
   </table>

  //一个神奇的属性:contenteditable,使内容可编辑(很好用!!)

4.<script>
     window.document.designMode="on";
  </script>

HTML5所提供的一个JS属性,当=“on”时,页面中的所有文字信息都可编辑(当然,这个属性也不常用,用的比较多的还是3)

原文地址:https://www.cnblogs.com/SunnyYYN/p/6885133.html