jquery全选 不全选

<input type="checkbox" id="check">点击

<input type="checkbox" class="check">

<input type="checkbox" class="check">

<input type="checkbox" class="check">

<input type="checkbox" class="check">

<script>

  $("#check").click(function(){

  $('.check').prop("checked",this.checked);

})

</script>

posted @ 2019-04-29 15:46  Gk°¯  阅读(141)  评论(1编辑  收藏  举报