单选按钮、复选框和下拉框
单选按钮用于一组相互排斥的选项,组中的每个选项应具有相同的名称(name),以确保用户只能选择一个选项,单选按钮对应的type设置为radio。
<form>
<input type="radio" name="fruit" value="apple">苹果<br>
<input type="radio" name="fruit" value="orange">桔子<br>
<input type="radio" name="fruit" value="mango">芒果<br>
</form>
复选框用于选择多个选项,讲input type设置为checkbox就可以创建一个复选框
<form>
<input type="checkbox" name="fruit" value="apple">苹果<br>
<i