jQuery一句就搞定radio返回值选定的问题

87281248 2013-07-24

jQuery(":radio[value=${user.gender}]").attr("checked",true);一句就搞定,而用平常的

             <td class="px10"><input type="radio" name="sex" id="radio" value="NONE" <c:if test="${sex=='NONE'}"><c:out value="checked"/></c:if>/>
                        保密 &nbsp; &nbsp;
                        <input type="radio" name="sex" id="radio" value="MAN" <c:if test="${sex=='MAN'}"><c:out value="checked"/></c:if>/>
                        男 &nbsp; &nbsp;
                        <input type="radio" name="sex" id="radio" value="WOMEN" <c:if test="${sex=='WOMEN'}"><c:out value="checked"/></c:if> />
                        女

</td>

相关推荐