复制代码 代码如下:
<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');
}
});
最后
以上就是结实网络最近收集整理的关于用jquery方法操作radio使其默认选项是否的全部内容,更多相关用jquery方法操作radio使其默认选项是否内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复