checkbox事件

<input id='bigclassauthorize' type='checkbox' onclick='testClickBigCheckBox()'/>
<input id='smallclassauthorize1' type='checkbox'/>

function testClickBigCheckBox(){
  var big = document.getElementById('bigclassauthorize');
  var small1 = document.getElementById('smallclassauthorize1');
  if(big.checked == true){
    small1.checked = true;
  }else{
    small1.checked = false;
  }
}

posted @ 2019-07-08 15:07  哒哇哩嘻  阅读(361)  评论(0编辑  收藏  举报