8. Form tagging and semantics
Forms are used to collect data and submit information
Only information within the form label can be submitted successfully to the server
The normal button function is to invoke the JavaScript code to perform the dynamic effect
Two ways to submit get and post, the first difference: Additional data size, security
2. Demand Analysis
Total two table frames
Table Box One: Required information
Name: Name, read-only, cannot be modified
Password: Enter symbol display, display 50 characters
Gender: Default male, single selection
Table Box Two:
Nationality: Default China, single choice
Hobbies: Multi-choice
Education: drop-down box single selection
Note
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/26/wKioL1XHYNWgHowGAAFOLKyLUl8881.jpg "title=" 002. PNG "alt=" wkiol1xhynwghowgaafolkylul8881.jpg "/>
Normal button: Show Prompt box
Submit button: Submit form appears on new page submit
Reset button: RESET
<body>
<form action = "02-font label." html "method =" POST ">
<fieldset>
<legend> Required Information </legend>
Name: <input type = "text" value = "Please enter name" size = "ReadOnly" disabled><br>
Password: <input type = "Password" value = "Please enter name" size = "><br>"
Hide box: <input type = "hidden" value = "Please enter name" size = "><br>"
Gender: <input type = "Radio" name = "Gender" value = "male" checked> male <input type = "Radio" name = " Gender "value =" female "> Women <br>
</fieldset>
<br>
<fieldset>
<legend> Optional Information </legend>
Nationality: <input type = "Radio" name = "Country" value = "China" checked> chinese <input type = "Radio" name = "Country "VALUE =" America "> USA <br>
Hobbies: <input type = "checkbox" name = "Love" value = "eat" checked> eat
<input type = "checkbox" name = "Love" value = "Sleep" checked> sleep
<input type = "checkbox" name = "Love" value = "study" checked> learn java<br>
Education: <select name = "Xueli" >
<option value = "University" > University </option>
<option value = "High School" > High School </option>
<option value = "PRIMARY" > Primary </option>
</select>
Remark: <textarea rows = "5" cols = ">" Big God, leave a few words </textarea><br>
</fieldset>
<input type = "button" value = "normal button" onclick = "alert (this.type)" >
<input type = "submit" VALUE = "Submit Button" >
<input type = "reset" value = "reset Button" >
<input type = "image" src = "images/1.jpg" width = "up" height = "a" >
</form>
<button onclick = "alert (' Good for everyone ')" > Normal button </button>
</body>
This article from "with June mutual encouragement" blog, please be sure to keep this source http://rickyigoogle.blog.51cto.com/8747999/1683158
Day1_html_ form Markers