<input type="radio" value="1"/>
<input type="radio" value="2"/>
<input type="radio" value="3"/>
当变量的值等于2时,value="2"的 radio就被选中,然后三个radio都disabled掉,用jquery怎么写,我写了的竟然在firefox下不能disabled在IE下可以,firefox是3.5.2的,jquery是1.2的 好奇怪啊。jquery不行的话用js写也行啊,不过在firefox下还是不能disabled。帮帮忙。
<input type="radio" value="2"/>
<input type="radio" value="3"/>
当变量的值等于2时,value="2"的 radio就被选中,然后三个radio都disabled掉,用jquery怎么写,我写了的竟然在firefox下不能disabled在IE下可以,firefox是3.5.2的,jquery是1.2的 好奇怪啊。jquery不行的话用js写也行啊,不过在firefox下还是不能disabled。帮帮忙。
解决方案 »
- 剪贴板兼容性问题
- <div>内容自动换行了?如何让它不换行?
- 在vs2010里面编辑HTML页面时,没有对Navigator智能感知功能
- jquery在火狐下没反应
- 关于JS中获取大量控件的值的问题
- js半角数字转换成全角数字
- 父窗体打开子窗体(不是同一个web服务器),用window.open('http://....','','')现在子窗体如何传值给父窗体
- javascript能不能用sql访问数据库,怎样写呢???
- 请教JavaScript高手:这样的表单功能可否实现。
- 怎样在javascript中获得当前页面里的applet中发生的事件,比如鼠标单击。
- ExtJs Combobox绑值问题
- 可不可以让网页上的滑动条固定住
<script src="js/jquery-1.3.2.js" type="text/javascript"> </script>
<script type="text/javascript">
window.onload=function(){
$("input[name='rd']").each(function(){
$(this).click(function(){
if($(this).val()==2){
$("input[name='rd']").attr("disabled",true)
}
return true;
});
})
}
</script>
<input type="radio" name="rd" value="1"/>
<input type="radio" name="rd" value="2"/>
<input type="radio" name="rd" value="3"/>
$(":radio").attr("disabled", true).filter("[value=2]").attr("checked", true);
<script src="js/jquery-1.3.2.js" type="text/javascript"> </script>
<script type="text/javascript">
window.onload=function(){
$("input[type='radio']").each(function(){
$(this).click(function(){
if($(this).val()==2){
$("input[type='radio']").attr("disabled",true)
}
return true;
});
})
}
</script>
<input type="radio" name="rd" value="1"/>
<input type="radio" name="rd" value="2"/>
<input type="radio" name="rd" value="3"/>