兼容性參考:https://caniuse.com/
1)新的 form 屬性:
autocomplete
novalidate
2)新的 input 屬性:
autocomplete
autofocus
form
form overrides (formaction, formenctype, formmethod, formnovalidate, formtarget)
height 和 width
list
min, max 和 step
multiple
pattern (regexp)
placeholder
required
H5屬性:
一、pattern="[A-z]{3}"
定義:
pattern屬性規(guī)定用于驗(yàn)證輸入字段的模式。模式值得是正則表達(dá)式叔扼。
注釋:
1)pattern屬性適用于一下<input>類(lèi)型:text,search漫雷,url瓜富,telephone,email降盹,password;
2)請(qǐng)使用標(biāo)準(zhǔn)的“title”屬性來(lái)描述模式
H4屬性:
一与柑、maxLength=“85”
定義:
maxLength屬性規(guī)定輸入字段的最大長(zhǎng)度,以字符個(gè)數(shù)計(jì)蓄坏。
注釋?zhuān)?br>
1)maxLength屬性與<input>類(lèi)型:text仅胞,password