java form elements

Form elements :

<Form> </ form> is meant to represent a form.

actio here is presented to that page

1 embodiment method has submitted data 2 get: 3 implicit submit the commit;

E.g:

 

 Here it means is submitted to Baidu, and the reality is submitted.

target中

_blank: a new window opens page

_self: open in its own page

 

Text categories :

Text box <input>: type-text

 

value is a value indicating the text box

name is the name of the text box

Form when the forms pass value to name = value of the value to pass

E.g

 

 

 

 

 

Password box <input>: type = "password

value is a value indicating the password box

name is the name of the password box
when traditional values form form, name = value to the value to pass

E.g

 

 

 

 Hidden field <input>: type = "hidden

value is the value of hidden field
name is the name of the hidden field
when traditional values form form, name = value to the value to pass

E.g

 

 

 

 Text field <textarea> </ textarea>: value is not written in the attribute value is written in the two labels

rows: the number of lines visible region

Lateral characters visible region: cols

* Values ​​are not displayed, but you can submit

E.g

 

 

 

 placeholder: default text displayed in the text box

Button class :

Push button <input>: type = button

name: The name of the button

value: text button display

E.g

 

 

 

 Submit button <input>: type = reset

name: The name of the button

value: text button display

E.g

 

 

 Picture button <the INPUT>: = the RESET of the type
name: the name of the button
value: button to display the text

E.g:

<input type="image" src="ligong.png" /><br>

 

 

 Mouse over the picture when you can have smaller hands connection instructions

 

 Select category :

Radio Button <input />:

 type="radio"
name = "button name"
value = "is the value of the button"

E.g:

<input type="radio" name="sex" id="" value="0" /><input type="radio" name="sex" id="" value="1" />

 

 

 Checkboxes <input />:

type="checkbox"
name = "name box"
value = "value of the check box"

E.g

<input type="checkbox" name="" id="" value="张店" />张店
<input type="checkbox" name="" id="" value="临淄" />临淄
<input type="checkbox" name="" id="" value="高清" />高清
<input type="checkbox" name=""Huantai/>= "Huantai"value= ""ID 

 

 

 

Drop-down list : <select> </ select> : represents the drop-down

name: represents the value of the pull-down

<Option> </ option>: term behalf

value represents the value of the item

E.g

< SELECT name = "sss" > 
        < Option value = "Zhangdian" > Zhangdian </ Option > 
        < Option value = "Linzi" > Linzi </ Option > 
        < Option value = "HD" > HD </ Option > 
        < Option value = "Huantai" > Huantai </ Option >

 

 

File selection :

 

 

 

 

type:file

name: is the name of the file

<input type="file" name="" id="" value="" />

 

 

 

 

 

Other attributes:

readonly = "readonly": read-only may be submitted for value

disabled = "readonly": value is not submitted values ​​not used

cheched = "cheched": is the default radio checkbox is checked

selected = "selected" using the drop-down list, select which one set

 

Guess you like

Origin www.cnblogs.com/www1842564021/p/11720855.html