效果图:默认选中一个单选按钮。
<tr> <th> ${message("Promotion.way")}: </th> <td> <label> <input type="radio" name="promotionWay" value="bussiness" checked="checked"/> ${message("Promotion.business")} <input type="radio" name="promotionWay" value="platform"/> ${message("Promotion.platform")} </label> </td> </tr>
另外,如果想让选中的按钮默认为后台字段的值
$(":radio[name='promotionWay'][value='" + $promotionWay + "']").prop("checked", "checked");jquery 根据值设置radio选中