Use the Radio box, check box, to let the user select
语法:
<input type= "Radio/checkbox" value= "value" name= "name" checked= "checked"/>
1.Type:
When type= "Radio" , the control is a radio box
When type= "checkbox" , the control is a check box
2, Value: submit data to the server values (background program PHP use)
3,name: for the control name, in case the background program ASP, PHP use
4,checked: When set checked= "checked", this option is selected by default
As in the following code:
Results displayed in the browser:
Note : The same group of radio buttons, name values must be consistent, such as the above example is the same name "Radiolove", so that the same group of radio buttons can play the role of radio.
Save space with a drop-down list box
Explain:
1. Value:
2,selected= "selected":
Set the selected= "selected" property, the option is selected by default.
Results displayed in the browser:
Use the drop-down list box to make multiple selections
The drop-down list can also be multi-select operation, in the <select> tag set multiple="multiple"
properties, you can implement multi-select function, under the widows operating system, in the multi-select press the Ctrl
key at the same time 单击
(under the Mac Command + click), You can select multiple options. The following code:
Results displayed in the browser:
check box, drop-down box