1、html:
<label style="font-size: 14px"><input id="input1"style="width:25px;height:13px;" type="radio" name="radio" value="否" checked/>否</label>
<label onclick="fun();" style="font-size: 14px"><input id="input2" style="width:25px;height:13px;" type="radio" name="radio" value="是" />是</label>
2、JS
獲取選中的radios的值
var freshYN = $('input:radio:checked').val();//獲取選中的radio的值
//checked代表爲選中
3、confirm彈出框的使用
<script>//點擊radio“是”彈出窗口顯示:是否切換
function fun(){
var r=confirm("確定切換至強制緩存狀態嗎?")
if (r==true)
{ }
else
{
$("#input1").attr("checked",true);
//取消,則將屬性設爲改變
}
}
</script>