email/url/range/number/search/color/tel/時間選擇/針對PC端的其它類型(除了number和時間選擇外,其它的類型都只有在手機端的輸入板有效果)數組
<input type="email">
<input type='url'>
<input type="tel" name='tel'>
<input type="number" name='number'>
PC端顯示(只有數字、運算符和字母e能夠做爲天然數的常數能夠輸入):
移動端輸入板顯示:
<input type="date"> :年月日
<input type="month"> :年月
<input type="week"> :年月星期
<input type="time"> :時分秒
<input type="datetime"> :年月日時分秒(UTC時間)
<input type="datetime-local">:年月日時分秒(本地時間)
PS:以上的input類型基本只有谷歌和Opera瀏覽器是徹底支持的,datetime類型谷歌瀏覽器不兼容
複製代碼
效果圖: 瀏覽器
此外還有選項框等: 手機端效果都是以滾輪的形式呈現的: 例如datetime-local類型<input type="color">
2.range:選取數值範圍,有max和min兩個屬性(不填寫則默認爲0到100) <input type="range" max='20' min='0' value='20'>
3.search:search類型和普通輸入框很相像,可是當有值輸入的時候,會多出一個能夠點選刪除的叉叉 <input type="search">
autocomplete/autofocus/multiple/requiredbash
<input type='text' required>
<input type='email' required>
link的sizes屬性/base對的target屬性異步
<head>
<base href='https://www.baidu.com/' target='_blank'>
</head>
<body>
<a href>aaa</a>
</body>
複製代碼
script/olasync
script標籤新增屬性 async和defer(異步加載外部js文件,可解決外部js放置在頭部致使的白屏問題) 不一樣點: async:何時加載完js何時執行 defer:全部資源加載完後再執行jsui
ol新增屬性 start(起始值)和reversed(倒序排列),注意,reversed的倒敘並不會使內容也倒敘,只是ol自帶的序號倒敘 start: url
reversed: