jQuery:.select()和.focus()方法的区别 [英] jQuery: .select() and .focus() method difference

查看:655
本文介绍了jQuery:.select()和.focus()方法的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在jQuery中,.select()&的基本区别是什么? focus()及其适合使用的地方是什么?

In jQuery, what is basic difference between .select() & focus() and what are their appropriate using places?

推荐答案

它们有区别:

  • .select() :选择"TEXT"时将触发.
    • 仅限于<input><textarea>元素.
    • .select(): will fire when TEXT is selected.
      • Limitted to <input> and <textarea> elements.
      • 也受限制,但范围更广,主要是诸如<input><select><a>
      • 之类的元素
      • Also limitted but to a wider range of elements, mostly form elements such as <input>, <select>, <a>

      这篇关于jQuery:.select()和.focus()方法的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆