var elems = $("input[title]");
var nochecknums = 0;
for (var x = 0; x < elems.length; x++) {
if (elems[x].type == "radio" && elems[x].checked == true && elems[x].title == nodeid) {
if (elems[x].value == 1) {
++nochecknums;
}
}
}
if (nochecknums == 0) {
$("#proResultNO" + nodeid).removeAttr("checked");
$("#proResultYes" + nodeid).attr("checked", "checked");
}
转载于:https://www.cnblogs.com/wuquelin/articles/3089880.html