一、根据值选择单选框的操作:
$("input[name='tempProduct.holdPmInfo.isSupportSubsidy'][value='1']").attr("checked",true);
二、获取选中单选框的值:
$("input:radio[name='tempProduct.holdPmInfo.isSupportSubsidy']:checked").val();
本文介绍如何使用jQuery操作单选框的选中状态及获取已选中的单选框值。具体包括设置指定值的单选框为选中状态的方法及读取当前选中的单选框值的技术。
一、根据值选择单选框的操作:
$("input[name='tempProduct.holdPmInfo.isSupportSubsidy'][value='1']").attr("checked",true);
二、获取选中单选框的值:
$("input:radio[name='tempProduct.holdPmInfo.isSupportSubsidy']:checked").val();
1812

被折叠的 条评论
为什么被折叠?