<section class="container" ng-controller="C18"> <table class='table table-bordered'> <thead> <tr> <th>选择</th> <th>姓名</th> <th>工资</th> <th>操作</th> </tr> </thead> <tbody> <tr ng-repeat="item in employee"> <td><input type='checkbox' ng-checked="selectAll"></td> <td ng-bind="item.name">Sunny</td> <td ng-bind="item.salary">8500</td> <td><button class='btn btn-danger'>删除</button></td> </tr> </tbody> </table> <input type="checkbox" ng-model="selectAll"> <span ng-hide='selectAll'>全选</span> <span ng-show='selectAll'>取消全选</span> </section> <script src="js/jquery-1.11.3.js"></script> <script src="js/angular.js"></script> <script> angular.module('M18', ['ng']). controller('C18', function($scope){ $scope.employee = [{ name: 'Sunny', salary: 7200 },{ name: 'Tom', salary: 6400 },{ name: 'Jerry', salary: 7800 }] $scope.selectAll = false; }) </script>