当前位置: 代码迷 >> Web前端 >> jQuery一句就搞定radio返回值选定的有关问题
  详细解决方案

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

热度:88   发布时间:2013-08-01 15:23:18.0
jQuery一句就搞定radio返回值选定的问题

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>

  相关解决方案