简单有效的方法,随笔记录一下
在html设置id
<input id="search_sim" type="text" class="form-control w-xxl" ng-model="queryObj.search" >

然后再js中设置相应的绑定事件

$('#search_sim').bind('keypress',function(event){//监听sim卡回车事件
        if(event.keyCode == "13")    
        {  
            $scope.doSearchSim();
            $scope.refresh();
        }
    });

当然,可以将bind改为on试试,也是一样的效果

 


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-12-12
  • 2021-08-22
  • 2022-12-23
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2021-09-17
  • 2021-11-01
  • 2022-12-23
  • 2021-11-09
相关资源
相似解决方案