<input type="radio" />的选中和禁用

来源:互联网 发布:淘宝风衣长款外套 编辑:程序博客网 时间:2024/04/28 18:11
<input type="radio" />的选中和禁用


选中:

<input type="radio" />多个单选框用时,要形成只能单选的效果必须name 是一样的,想选中某个框要用checked,如<input type="radio"  checked />,不用checked="true"这样写。(zkdceo亲测)


禁用(转):


禁用 radio ,设置为只读,不能选定:

<input name="gender" type="radio" value="1"  disabled/>   ----(zkdceo亲测)
        <span >男</span>
        <input type="radio" name="gender" value="0"  disabled/>
        <span >女</span>

 

当为:

<INPUT TYPE="radio" readonly> 只读.

radio控件本身就是只读了,所以加readonly等于没效果...    


type="radio"标签 选中和禁用都是直接附属性即可,不用写=true,写了反而没效果






0 0
原创粉丝点击