Reprint Address: http://www.cnblogs.com/kissdodog/archive/2013/01/10/2854917.html
First, the Text field
<Type= "text" name= "text" value/>
Two, password domain
The password is similar to a text box, but the content entered inside is displayed as a dot.
<type= "password" name= "text" value/>
Three, radio button
Man:<type= "Radio" name= "Sex" value/> Male</> woman:< type= "Radio" name= "Sex" value/> Female
Four, check box
<type= "checkbox" name= "Check1" value/>
Five, button
<Type= "button" value/>
Six, reset button
When you click the Reset button, the form where the reset button is located is emptied, and the other forms are unaffected.
<type= "reset" value/>
Seven, submit button
When you click the Submit button, the browser will automatically submit the form.
<Type= "Submit" value/>
Eight, hidden fields
Hidden fields are not displayed in the browser and exist only to save some less important information.
<type= "hidden" value/>
IX. Upload domain
<Type= "file" value/>
Ten, Picture button
<Type= "image" src/>
Xi. drop-down list
<Select><OptionValue= "0">0</option> <option value= "1">1</option> <option value= "2">2</option></Select>
Property |
Optional values |
Description |
Disabled |
Disabled |
Specifies that the drop-down list is disabled. |
Multiple |
Multiple |
Specifies that multiple options can be selected. |
Name |
Name |
Specifies the name of the drop-down list. |
Size |
Number |
Specifies the number of visible options in the drop-down list. |
12. Label
The label element does not present any special effects to the user. However, it improves usability for the user of the mouse. This control is triggered if you tap text inside a LABEL element. That is, when the user selects the label, the browser automatically shifts the focus to the label-related form controls. For example, when you place a radio button inside a label. Clicking on the text in the label will also trigger the radio button, rather than just dot dots.
<P><Label><InputType= "Radio"Name= "male" </< Span style= "color: #800000;" >label></p> <p><label><input = "Radio" Name= " Male "/> woman </></p>
ManWoman
Can also be written like this
<Form><LabelFor= "Male">male</Label><InputType= "Radio"Name= "Sex"Id= "Male"/><br /> <label for= " Female ">female</ label> <input type= "Radio" Name= "Sex" Id= "female "/></form>
Form elements of HTML