jQuery.expr[':'].Contains = function(a, i, m){
 return jQuery(a).text().toUpperCase()
   .indexOf(m[3].toUpperCase()) >= 0;
};  

用法:

$("div:contains('John')")

测试HTML文件:

<div>john</div>
<div>John</div>
<div>hey hey JOHN hey hey</div>

相关文章:

  • 2021-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-11-05
  • 2021-10-25
  • 2021-12-05
  • 2022-12-23
猜你喜欢
  • 2021-11-25
  • 2022-01-09
  • 2022-02-04
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
相关资源
相似解决方案