<tr> <th>是否映射:</th> <td> <input type="radio" name="sfys" class="radio" id="yes" value="1"/><label for="yes">是</label> <input type="radio" name="sfys" class="radio" id="no" value="0"/><label for="no">否</label> </td> </tr>
用jquery方法操作,使其默认选项是否.
$(function () {
var sfys = "<#if os??&&os.sfys??>${os.sfys}</#if>";
if (sfys == '1') {
$("#yes").attr('checked', 'checked');
} else {
$("#no").attr('checked', 'checked');
}
}); 






网友评论文明上网理性发言 已有0人参与
发表评论: