zoukankan      html  css  js  c++  java
  • AngularJS 1.0案例 取消全选

    <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>
  • 相关阅读:
    Ubuntu中的vsftpd配置
    Ubuntu学习-增加更新源及安装软件及卸载软件
    Ubuntu16.04下安装sublime text3
    需要读的书
    同一机器 部署 两个 jboss
    log4j 总结 精华
    oracle 笔记
    oracle 用户 多个表空间
    json
    json 基础
  • 原文地址:https://www.cnblogs.com/SharkJiao/p/13780246.html
Copyright © 2011-2022 走看看