<input type="radio" />的选中和禁用
2017-01-17 14:26
253 查看
<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,写了反而没效果
选中:
<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,写了反而没效果
相关文章推荐
- jQuery操作<input type="radio">
- jQuery操作<input type="radio">
- jQuery操作radiojQuery操作<input type="radio">
- jQuery操作<input type="radio">
- 页面<input type="radio"...>取值
- [转]jQuery操作<input type="radio">
- jQuery操作<input type="radio">
- <input type="radio" >与<input type="checkbox">值得获取
- jQuery操作<input type="radio">
- struts2 <input type="radio" 默认选中
- asp.net 隐藏页面<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value=''>的值
- jsp<input type="image" ...>和<img ...>的区别
- <input id="File_Audio" type="file" /> 一步到位上传图片、音频等文件
- 获取<input type="checkbox" >控件的checked值
- jQuery动态添加<input type="file">
- android支持html的<input type="file">标签
- <input type="text"> and <html:text> 禁止复制
- <input type="text"> 的document.getElementById("").value和document.getElementById("").getAttribute("value")不相同
- 关于JSP中单击任意标签弹出文件选择框(<input type="file"/>)的实现方法
- <input type="text"/>可通过width="" height=""设置宽度高度