In general, forms are essential in a single page, and here's my summary of my knowledge of the form:
Table element , form Properties , and form submission (JS knowledge) in turn
1. Form elements:
<form action= "Submit the location//not write the words will be submitted to itself" method= "How to send form data" ></form>
Elements within a form:
1)DataList(Data list)
2)keygen(Generate encrypted string)
3)output (output result)
4)meter(measuring device)
2. Form properties:
1)Palceholder: Please enter the user name when the user enters the text, the content within the placeholder disappears
2)Autofocus: Automatically get focus
3)multiple: Multi-file transfer, using in file
4)autocomplete= "on": Automatically replenish remaining content
5)novalidate: Turn off authentication
6)required: Required fields
7)pattern: Custom Validation (pattern= "\d") requires input number, capital D is
3, form submission verification:
Onsubmit= "return function ()"
code example:
functionCheckform () {//get the value of an email varemail = document.getElementById ("email")). Value; if(Email = = ""){ return false; }Else if(Email.indexof ("@") ==-1){ return false; }Else{ return true; } }
Note: If you want to verify the account and verify the password, you need to write Retrun true again.
CSS Form Properties