jQuery1.9以上版本, 用attr("checked",true)会失效,不能选中。
attr(
"checked"
,
true
)会失效,不能选中。
需要用$(ele).prop("checked", true);$(ele).prop("checked", false);来代替