search

Home  >  Q&A  >  body text

javascript - Multiple field search in a single control

1. The search function in the project can search according to the parameters returned by the background

2. Now we can only search in a single field (request data). How to deal with multiple fields? Is it a filter to search in multiple fields? How to do it specifically?

Part of the code is as follows

<p class="form-search m-t-xs m-b-xs inline">
    <input type="text" class="s_input bg-white-only" placeholder="请房间号或患者名字" ng-model="searchInfos.name" ng-keyup="myKeyup($event)">
    <i class="glyphicon glyphicon-search input_enter_icon" ng-click="search()"></i>
</p>
$scope.search = function () {
    $scope.searchInfos.page = 1; //点击搜索时,传给后台的P参数置为1
    $scope.currentPage = 1;
    $scope.inpatientList();
}
某草草某草草2812 days ago676

reply all(1)I'll reply

  • 为情所困

    为情所困2017-05-15 17:16:05

    filter: Function
    Do your filtering in the function

    reply
    0
  • Cancelreply