<!DOCTYPE Html>
<html>
    <head>
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
        <script type="text/javascript">
            function selectAll(checkbox) {
                $('input[type=checkbox]').prop('checked', $(checkbox).prop('checked'));
            }
        </script>
    </head>
    <body>
        <input type="checkbox" onclick="selectAll(this);" />全选<br/>
        <input type="checkbox"  /><br/>
        <input type="checkbox"  /><br/>
        <input type="checkbox"  /><br/>
        <input type="checkbox"  /><br/>
        <input type="checkbox"  /><br/>
        <input type="checkbox"  /><br/>
        ……
    </body>
</html>

 

相关文章:

  • 2022-01-30
  • 2021-12-05
  • 2021-10-01
  • 2022-12-23
  • 2022-01-25
  • 2022-01-24
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-11-28
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案