在使用表单设计调查表时,为了减少用户的操作,使用选择框是一个好主意,html中有两种选择框,即单选框和复选框,两者的区别是单选框中的选项用户只能选择一项,而复选框中用户可以任意选择多项,甚至全选。请看下面的例子:
语法:
<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:
Note: The <label> tags in the code are explained in this chapter 5-9.
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.
Practice:
html--Use the Radio box, check box, let the user select