[转发]jquery .filter()过滤器

https://www.cnblogs.com/gates/p/4303262.html

情景如下:当我们焦点处在5000处的输入框并变动金额时,我们获取所有下面相邻的输入框金额元素,过滤掉输入框只读状态和输入框为0的集合

var item = _this.closest("tr").nextAll().find("input[name=Amount]").filter(function () 
{
return !$(this).attr("readonly")&&$(this).val()!=0;
})

图示如下:

 

posted @ 2024-05-10 09:31  James·wang  阅读(11)  评论(0编辑  收藏  举报