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[name='ABC']") // without ":" $(":input[name='ABC']") // with ":"
两者对我来说都是一样的,所以我们应该用冒号“:”还是不用冒号?哪个更正确?
input只会专门选择<input>元素。
input
<input>
:input选择<input>, <textarea>,<select>和<button>.
:input
<textarea>
<select>
<button>