Html Table Element , main purpose : user input data, and submit to the server
the basic syntax is :
<form action= "url" (refers to who submits the form to) method= "submitted method (get/post), default is get" >
Various input elements "input box, drop down list, text field, Password box"
</form>
Case Study: Login interface
Login.html
<HTML><Head><title>Login interface</title></Head><Body><formAction= "ok.html"Method= "Get">User name:<inputtype= "text"name= "username" /><BR/><!--space entity, or full-width space -Dense Code:<inputtype= "Password"name= "pwd"/><BR/><inputtype= "Submit"value= "Login"/> <inputtype= "Reset"value= "Re-fill"></form></Body></HTML>
Ok.html
< HTML > < Body > Landing Success </ Body > </ HTML >
Run :
Basic syntax of the form <form action= "url" method=*>
...
...
<input type=submit> <input type=reset>
</form>
Input forms available to users in the form
<input type=* name=**>
*=text, password, checkbox, radio, image, hidden, submit, reset
**=symbolic Name for CGI script
*=get, POST
(1) Format of form elements
<input type=* name=**/>
type= Text [ textbox ]&NBSP; , password [ Password box ]&NBSP; , hidden [ hidden Fields ]&NBSP; , checkbox [ check box ]&NBSP; , Radio [ Radio box
Submit [ submit button ] , Reset [ Reset button ] , image[ Picture button ]
Name is the form element you named
(2) Action specifies which pages to submit these requests to
Action The general submission is servlet,jsp file
Post does not display the submission in the Address bar
Get will display the user name and password submitted but the address bar
The picture can also be made into a submit button
<input type= "image" src= "girl.jpg"/>
Value is the word that is displayed on the button
INPUT Element Example
<HTML><Body>************ text box with Password box ************<BR/>Name:<inputtype= "text"value= "Please enter first name"name= "username"/><BR/>Password:<inputtype= "Password"name= "pwd"/><BR/><BR/>************ check box (like fruit) ************<BR/><!--name to remain consistent -<inputtype= "checkbox"name= "V1">Watermelon<BR/><inputtype= "checkbox"name= "V1">Apple<BR/><BR/>************ Radio Box (choose Gender) ************<BR/><!--name to remain consistent -<inputtype= "Radio"name= "Sex">Man<BR/><inputtype= "Radio"name= "Sex">Woman<BR/><BR/>******* Hidden (his use is mainly to submit data, without affecting the layout of the interface) * * * *<BR/><inputtype= "hidden"value= "123"name= "Sal"/><BR><BR/>************ drop-down selection (please select your place of birth) ************<BR/><Selectname= "Biradd"><optionvalue="">--Please choose--</option><optionvalue= "Beijing">Beijing</option><optionvalue= "Shanghai">Shanghai</option><optionvalue= "Chongqing">Chongqing</option></Select><BR/><BR/>***************** text field (please leave a message) *************<BR/><textareacols= " the"rows= "Ten">Please enter here ...</textarea> <BR><BR/>*********** File Control (select the file you want to upload) ********<BR/><inputtype= "File"name= "MyFile"/>Please select a file<BR><BR/></Body></HTML>
Display effect:
HTML form form element various input elements common elements synthesis case