批量删除

来源:互联网 发布:python 嵌套字典赋值 编辑:程序博客网 时间:2024/06/06 02:40
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <center>
            <h3>主页面</h3>
            <div>
                姓名:<input type="text" placeholder="用户名" size="8" ng-model="gen"/>&nbsp;&nbsp;
                年龄:<select ng-model="size">
                        <option>--请选择--</option>
                        <option>11-20</option>
                        <option>21-30</option>
                        <option>31-40</option>
                        <option>41-50</option>
                        <option>51-60</option>
                    </select>&nbsp;&nbsp;
                <button ng-click="deleteSel()">批量删除</button><br/><br/>
            </div>
            <table border="1 solid blue" cellpadding="10" cellspacing="0">
                <thead>
                    <tr>
                        <th><input type="checkbox" ng-model="selectAll" ng-click="selectAllFun()"/></th>
                        <th>id</th>
                        <th>姓名</th>
                        <th>密码</th>
                        <th>年龄</th>
                        <th>性别</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="user in users | filter:{name:gen}" ng-if="ageSize(user.age,size)">
                        <td><input type="checkbox" ng-click="checkSelect($index)" ng-model="user.state"/></td>
                        <td>{{user.id}}</td>
                        <td>{{user.name}}</td>
                        <td>{{user.pwd}}</td>
                        <td>{{user.age}}</td>
                        <td>{{user.sex}}</td>
                        <td><button>删除</button></td>
                    </tr>
                </tbody>
            </table>
        </center>
    </body>
</html>