1.
Submit data using the Submit button
There are two types of buttons available in the form: Submit button, reset. This section explains the Submit button: The Submit button is required when the user needs to submit form information to the server.
Grammar:
<input type= "Submit" value= "Submission" >
Type: The button has a commit function only if the type value is set to submit
Value: The text displayed on the button
Example:
Results displayed in the browser:
Task
Let me try it: change the input box of the right editor to a button
2.
Use the reset button to reset the form information
When the user needs to reset the form information to the initial state, such as when the user enters the "user name" and finds that the handwriting is incorrect, you can use the Reset button to return the input box to its original state. You only need to set the type to "reset".
Grammar:
<input type= "reset" value= "reset" >
Type: The button has a reset function only if the type value is set to reset
Value: The text displayed on the button
Example:
Results displayed in the browser:
Enter your account
Click the Reset button
Task
Let me try it: Change the "submit button" to "reset button"
1. In the 17th line of the right editor, change type= "submit" to type= "reset"
2, in the right editor in the 17th line, the value= "submit" to value= "reset"
Label labels in a 3.form form
Little friends, you are learning the form in front of the various controls, when you find a label--label, this section to reveal its role.
The label label does not present any special effects to the user, and it is useful for improving usability for the mouse user. If you click on the text within the label tag, the control is triggered. That is, when the user clicks the label label, the browser automatically shifts focus to the label-related form control (automatically selected on the form control associated with the label label).
Grammar:
<label for= "Control ID Name" >
Note: The value in the for property of the label should be the same as the value of the associated control's ID property.
Example:
<form>
<label for= "Male" > Men </label>
<input type= "Radio" name= "Sex" id= "male"/>
<br/>
<label for= "female" > Women </label>
<input type= "Radio" name= "Sex" id= "female"/>
<label for= "Email" > Enter your email address </label>
<input type= "Email" id= "email" placeholder= "Enter Email" >
</form>
Task
I'll try it: complete the following tasks
Requirements: Jogging, mountaineering and basketball check boxes are associated with the for property with their respective complex options. As follows:
Note: This section does not validate the correctness, please check the results window and the results of the task to give the picture is consistent, so as to determine whether the input code is correct.
HTML Learning 3