标签: jquery
jQuery中有没有更好的方法可以做到这一点?
$(":text").each(function() { if (this.style.visibility == "visible") { ... }; });
答案 0 :(得分:5)
是:
$(":text:visible").each(function() { ... });
更新由于jQuery不再有效:details。
答案 1 :(得分:0)
您正在寻找:visible选择器:
:visible
$(':text:visible')
答案 2 :(得分:0)
速度使用
$(':text').filter(":visible")