全局屬性
- Contenteditable可以設(shè)定該元素是否可以編輯,contenteditable="true"時(shí)為可編輯
- hidden可以使內(nèi)容不可見
- spellckeck可以用于語(yǔ)法檢測(cè),在輸入錯(cuò)誤單詞時(shí)會(huì)出現(xiàn)下劃線提示錯(cuò)誤
- tabindex可以設(shè)定訪問順序,按tab鍵可以看到其訪問順序?yàn)槠渲抵付ǖ捻樞?/li>
<a href="#" tabindex="1">hello</a>
<a href="#" tabindex="3">hello</a>
<a href="#" tabindex="2">hello</a>
新增主體結(jié)構(gòu)元素
- article可以嵌套使用,可以用來(lái)表示插件,article是一個(gè)特殊的section標(biāo)簽 代表一個(gè)獨(dú)立的內(nèi)容塊
- section類似div,但它一般會(huì)帶有標(biāo)題
- nav可以用作頁(yè)面導(dǎo)航
- aside表示頁(yè)面的附屬信息
- time指定時(shí)間,屬性pubdata
- header通常用于放置標(biāo)題,Logo
footer同上 - address定義聯(lián)系信息
表單新增元素與屬性
- form屬性聲明從屬的指定表單
<form id="testform">
<input type="text">
</form>
<textarea form="testform"></textarea>
- formaction屬性跳轉(zhuǎn)界面
<form id="testform">
<input type="submit" name="s1" value="v1" formaction="a.jsp">提交到a.jsp
</form>
- formmethod屬性以不同方式發(fā)送數(shù)據(jù),有g(shù)et post兩種
- formenctype屬性對(duì)表單元素指定不同的編碼方式
- formtarget屬性類似target
- autofouce屬性會(huì)獲取光標(biāo)的焦點(diǎn)
<input type="text">
<input type="text" autofocus>
7.required屬性如果輸入內(nèi)容為空,不能提交