在 jQuery 中,两者之间的基本区别是什么.select()
& focus()
它们合适的使用场所是什么?
他们有各自的区别:
-
.select()
: will fire when TEXT is selected.
- 仅限于
<input>
and <textarea>
元素。
-
.focus()
: will fire when an element receives focus i.e. an input box is clicked on, tabbed into, etc.
- 也受到限制,但涉及更广泛的元素,主要是表单元素,例如
<input>
, <select>
, <a>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)