<table class="table-hover" cellspacing="0" cellpadding="0" style="80%;margin-left: 10%;"> <tr> <td colspan="3" style="75%;"> 承包商资质是否符合要求 </td> <td id="pj1"> <div class="radio-box"> <input type="radio" name="pj1" id="pj1_s" checked = "checked" value="1"><label for="pj1_s">是</label> </div> <div class="radio-box"> <input type="radio" name="pj1" id="pj1_f" value="0"><label for="pj1_f">否</label> </div> </td> </tr> </table>
获取: "pj1" : $("input[name='pj1']:checked").val(),
回显:$("input[name='pj1'][value='${con.pj1}']").attr("checked","checked");
JS: $("input[name='pj1'][value='${con.pj1}']").prop("checked", "checked");
prop可能适应大多数IE版本
具体可参考文章:https://blog.csdn.net/wyljz/article/details/52414310