1、根据传来的值设置对应单选框的选中状态
p.find("input[name=type]").each(function(){
if($(this).val()==aa){
$(this).attr("checked",true);
}
})
还有一种待测:
p.find('input[value="是"]').prop('checked',aa=='是')
2.关于传参数的问题
一般来说传入的值不是数字的话 最好都要加上引号
示例 iconHtml += '<a href="#" class="item" id="'+menu[i].iconsetid+'" οnclick="setMenuCode(
\''+menu[i].iconsetid+
'\')">';
传递参数
$("#showTableDiv").load(url,{schid:
"\'"+schid+
"\'"},function(){});
还有一个待测的方法:传对象过去
3.延迟加载
setTimeout(function() {
}, 5);