jquery radio

来源:互联网 发布:淘宝分享有礼效果怎样 编辑:程序博客网 时间:2024/05/28 17:07

<input name="ifPop" type="radio" value="1" onclick="ChoosePop()">弹出
   <input name="ifPop" type="radio" value="0" onclick="ChoosePop()">不弹出

 

 

 

if(ifPop=="true") $("input[name='ifPop']").attr("checked","1");
else $("input[name='ifPop']").attr("checked","0");

 

 

if(ifPop=="true")

$("input[name='ifPop']").get(1).checked = true;

else $("input[name='ifPop']").get(0).checked = true;

原创粉丝点击