87,907
社区成员
发帖
与我相关
我的任务
分享
<input type="radio" name="categoryAttribute.inputType" value='1'/>
<input type="radio" name="categoryAttribute.inputType" value='2'/>
<input type="radio" name="categoryAttribute.inputType" value='3'/>
<input type="radio" name="categoryAttribute.inputType" value='4'/>
$("input[name='categoryAttribute.attributeType']").click(function(){
alert($(this).val());
if($(this).val() == 1 || $(this).val() == 2){
$("input[type='radio'][name='options1'][value='1']").attr("checked","true");
$("input[type='radio'][name='options1'][value='0']").attr("disabled","disabled");
}else
{
$("input[type='radio'][name='options1'][value='0']").attr("checked","true");
$("input[type='radio'][name='options1'][value='0']").attr("disabled","");
}
});
改成这样貌似可以
$("input[type=radio][name=categoryAttribute.inputType]")