To succeed in everything, it is necessary to pay the price: struggle. --Emerson
What's in this lecture: form form Element
First, form form element Introduction: HTML form elements, mainly used to let the user input data, and submitted to the server.
Basic syntax:
<form action = "url" method = "Methods submitted (Get/post), default is Get" >
Various elements [input box, drop-down list, text field, Password box ... ]
</form>
Get and Post differences: The contents of the post form are sent over HTTP, and the form's submission is not visible in the address bar
Forms Common Controls
Property |
Describe |
Input type= "text" |
Single line text input box |
Input type= "Password" |
Password entry box |
Input type= "Radio" |
Radio Box |
Input type= "checkbox" |
check box |
Select |
list box |
TextArea |
Multi-line text input box |
Input type= "Submit" |
button to submit the form contents to the server |
Input type= "Reset" |
Clear all the contents of the form and re-fill the button |
INPUT type = "image" src=
|
Image |
|
|
Case 1
Case 2
Like fruit *****<br/><input type = "checkbox" name = "V1" > Watermelon <br/><input type = "checkbox" name = "V1" & gt; Apple <br/>***** like sex *****<br/><input type = "Radio" name = "Sex"/> male <br/><input type = "Radio" name = "Sex"/> female <br/>***** hidden (it's useful primarily to be able to submit data without affecting the interface) *****<br/><input type = "hidden" value = " 123 " name =" Sal "/>***** like picture *****<br/><input type =" image "Name=" Submit "align=" top "src =" shan.jpg " >***** Choose *****<br/> Please select your birthplace <select name = "Biradd" ><option value = "" >----Please select----</option ><option value = "YJ" > Yangjiang </option><option value = "sh" > Shanghai </option><option value = "ch" > Chongqing </option></select><br/>***** Please leave a message *****<br/><textarea cols = "a" row= "ten" > Please enter ... </textarea>***** Please select the file you want to upload *****<br/><input type = "File" name = "MyFile"/> Please select File
This is where we go, take your time and enjoy it
Chapter IV: Use of HTML (iii)