Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
选择文本框哪个更好:
input[type=text]或者input:text
input[type=text]
input:text
使用哪个?
最短的:
$('input:text')
记住你也可以
$(':text')
虽然手册不建议这样做。
请注意,Internet Explorer 不支持
CSS 选择器,但它适用于 JQuery。最简单的当然是
:text