欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

checkbox選中與未選中判斷示例

 更新時間:2014年08月04日 08:32:28   投稿:whsnow  
本節(jié)主要介紹了checkbox選中與未選中的判斷方法,需要的朋友可以參考下
$(document).ready(function() {
  var flag = $("#protTuanFlag").val();
  if(flag==1){
    document.getElementById("tuan").checked=true;
  };
  $("#tuan").click(function() {
    if(document.getElementById("tuan").checked){
      //alert("選中");
       document.getElementById("tuan").value = 1;
       // alert(document.getElementById("tuan").value);
    }else{
      //alert("未選中");
       document.getElementById("tuan").value = 0;
       //alert(document.getElementById("tuan").value);
    }
  });
})

相關(guān)文章

最新評論