<input type="radio" id="radiobutton1" class="suplierRedio" checked="checked" value="1" name="radiobutton" />
<input type="radio" id="radiobutton2" class="suplierRedio" value="2" name="radiobutton" />
<input type="radio" id="radiobutton3" class="suplierRedio" value="3" name="radiobutton" />
//点击供应商单选按钮
jQuery(suplierRedio).on("click",clickradio);
//获取已选择供应商的价格
function clickradio(){
jQuery(suplierRedio).each(function() {
if (this.checked == true) {
var num = this.value;
jQuery(checkedSuplier).val(num);
if(num=="1")
jQuery(sjPrice).val(jQuery(price1).val());
else if(num=="2")
jQuery(sjPrice).val(jQuery(price2).val());
else if(num=="3")
jQuery(sjPrice).val(jQuery(price3).val());
}
});
};
jQuery(radiobutton+n).attr("checked",true); //默认选中某一个
jQuery(suplierRedio).attr("disabled",true); //不让更改