需求如下:该搜索框是对整个页面的input检索 ,但与弹出层中的input冲突

 

元素选择器之排除特定元素

元素选择器之排除特定元素

博主几经辗转 简单处理 解决问题,思路如下:排除掉特定class的input。

代码如下:

$('input:not(.pop)', this.footer()).on('keyup change', function () {
     if (that.search() !== this.value&&$(this).attr("type")!="file") {

         that.search(this.value).draw();
         list_overview_DataTableAll.status.save();
     }
 });

 

相关文章: