Home>Article>Web Front-end> What are the new form controls and form attributes in HTML5?
HTML5 is the next generation standard of the Internet and a language method for constructing and presenting Internet content. It is considered to be one of the core technologies of the Internet.
HTML5 is the specification of the core language HTML in the Web. The content that users see when browsing the web using any means is originally in HTML format. It is converted into a recognizable format through some technical processing in the browser. Information. HTML5 has made certain improvements on the basis of the previous HTML4.01. Although technical personnel may not put these new technologies into application during the development process, website development technical personnel must be aware of the new features of this technology. understand.
New input form control:
email: Email text box, no different from ordinary ones
- When the input is not an email address, the verification fails
- The keyboard on the mobile terminal will change
tel: phone number
url: URL of the webpage
search: search engine
- After entering text under chrome, there will be more A closed
- Example: Weibo password box prompt
autocomplete## required: This option is required and cannot be empty
Pattern: Regular Verification
- pattern="\d{1,5}"
Formaction defines the submission address in submit
// required 和 pattern 具有安全隐患 如果在控制台修改input的pattern和required 那么就可以破除校验 // 如果用户在某个页面输入相当多的数据,临时有事需要离开一段时间,此时数据应该保存至草稿箱,那么同一个form表单下,将会有两个不同地址的sumbit提交 ope浏览器已支持 其余浏览器可能不支持
Related recommendations:
html5 tutorialThe above is the detailed content of What are the new form controls and form attributes in HTML5?. For more information, please follow other related articles on the PHP Chinese website!