当前位置: 代码迷 >> Web前端 >> jquery 兑现checkbox全选
  详细解决方案

jquery 兑现checkbox全选

热度:275   发布时间:2012-06-28 15:20:03.0
jquery 实现checkbox全选

<script type="text/javascript">
??? ??????????? function selectAll(checkbox) {
??? ??????????????? $('input[type=checkbox]').attr('checked',?? $(checkbox).attr('checked'));
??? ??????????? }
?</script>

?

?

< input type = "checkbox" onclick = "selectAll(this);" />全选

< input type = "checkbox" ? />
< input type = "checkbox" ? />
< input type = "checkbox" ? />
< input type = "checkbox" ? />
< input type = "checkbox" ? />
< input type = "checkbox" ? />
  相关解决方案