- `遍历 each
$("input[name='supplyProtocolType']").each(function (){
var str = $(this).val();
if (str == supplyProtocolType) {
$(this).attr("checked",true);
}
});
//选中状态
$("#id input[name='supplyProtocolType']:checked").each(function (){
var str = $(this).val();
if (str == supplyProtocolType) {
$(this).attr("checked",true);
}
});
2 禁用 父节点 下所有符合条件 input框节点
$('#id input[name='protocol']').attr("disabled", "disabled");
$("#id input").removeAttr("disabled");
$("#id input").prop("disabled");// 删除属性 和removeAttr 有区别