Form elements of HTML

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.