DDR爱好者之家 Design By 杰米

废话不多说了,直接给大家贴代码,具体代码如下所示;

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    .sspan{
      background: #28a54c;
      color: #fff;
      margin-left: 5px;
    }
    th,td{
      border: 1px solid #000;
      padding: 10px;
    }
    table{
      text-align: center;
      width: auto;
      border-collapse: collapse;
    }
    button{
      margin-top: 10px;
      margin-bottom: 10px;
    }
  </style>
</head>
<body ng-app="myapp" ng-controller="myCtrl">
  <div style="width: 1000px">
    <input type="text" placeholder="用户名搜索" ng-model="yhmss"/>
    <input type="text" placeholder="手机号搜索" ng-model="sjhss"/>
    <select ng-model="Choicecity">
      <option>选择城市</option>
      <option>北京</option>
      <option>上海</option>
      <option>天津</option>
      <option>重庆</option>
    </select>
    <select ng-model="Choicestate">
      <option>选择状态</option>
      <option>发货</option>
      <option>已发货</option>
    </select>
    <select ng-model="Choiceorder">
      <option>开始月份</option>
      <option>8</option>
      <option>9</option>
      <option>10</option>
    </select>
    -
    <select>
      <option>结束月份</option>
      <option>8</option>
      <option>9</option>
      <option>10</option>
    </select>
  </div>
  <button ng-click="tianjia()">新增订单</button>
  <button ng-click="plsc()">批量删除</button>
  <table>
    <thead>
    <tr style="background: #4404">
      <th><input type="checkbox" ng-model="checkAll" ng-click="quan()"/></th>
      <th>id<button ng-click="sort('id')" class="sspan">排序</button></th>
      <th>商品名</th>
      <th>用户名</th>
      <th>手机号</th>
      <th>价格<button ng-click="sort('price')" class="sspan">排序</button></th>
      <th>城市</th>
      <th>下单时间<button ng-click="sort('order')" class="sspan">排序</button></th>
      <th>状态</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in data|filter:{name:yhmss}|filter:{phone:sjhss}|filter:cityFun|filter:stateFun|filter:orderFun|orderBy:cc:dd">
      <td><input type="checkbox" ng-model="item.done"/></td>
      <td>{{$index+1}}</td>
      <td>{{item.commodity}}</td>
      <td>{{item.name}}</td>
      <td>{{item.phone}}</td>
      <td>{{item.price}}</td>
      <td>{{item.city}}</td>
      <td>{{item.order}}</td>
      <td ng-click="fahuo($index)"> {{item.state}} </td>
    </tr>
    </tbody>
  </table>
  <div ng-show="tj" style="margin-left: 200px" >
    <h1>添加</h1>
    <form name="registerForm" novalidate>
      <div id="email-group">
        <label for="email">E-mail:</label> <input type="email" class="form-control" ng-model="email" name="email" id="email" placeholder="请输入电子邮箱..." required>
        <p>
          <span style="color: red" ng-show=" registerForm.email.$invalid">
            <span ng-show="registerForm.email.$error.required">*请输入邮箱</span> <span
              ng-show="registerForm.email.$error.email">*请输入正确的email地址</span>
          </span>
        </p>
      </div>
      <div id="name-group">
        <label for="name">昵称:</label> <input type="text" class="form-control" ng-model="name" name="name" id="name" placeholder="请输入昵称..." required>
        <p>
          <span style="color: red" ng-show="registerForm.name.$invalid">
            <span ng-show="registerForm.name.$error.required">*请输入姓名</span>
          </span>
        </p>
      </div>
      <div id="password-group">
        <label for="password">密码:</label> <input type="password" class="form-control" ng-model="password"
                             ng-minlength="6" ng-maxlength="20" name="password" id="password"
                             placeholder="请输入密码..." required>
        <p>
          <span style="color: red" ng-show="registerForm.password.$invalid">
            <span ng-show="registerForm.password.$error.minlength">*密码长度不小于6</span>
            <span ng-show="registerForm.password.$error.maxlength">*密码长度不超过20</span>
          </span>
        </p>
      </div>
      <div id="passwordagaingroup">
        <label for="passwordagain">再输入一遍密码:</label> <input type="password"
                                  class="form-control" ng-model="passwordagain" name="passwordagain"
                                  id="passwordagain" placeholder="请再输一遍密码..." required>
        <p>
          <span style="color: red" ng-show="registerForm.password.$valid">
            <span ng-show="passwordagain!=password">*两次密码输入不一致</span>
          </span>
        </p>
      </div>
      <button type="submit" class="btn btn-success" ng-click="tianjiapp()"
          ng-disabled="registerForm.email.$invalid || registerForm.name.$invalid || registerForm.password.$invalid || password != passwordagain">
        提交<span class="fa fa-arrow-right"></span>
      </button>
    </form>
  </div>
</body>
</html>
<script src="/UploadFiles/2021-04-02/angular.js">

总结

以上所述是小编给大家介绍的Angular搜索 过滤 批量删除 添加 表单验证功能集锦(实例代码),希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米

稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!

昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。

这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。

而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?