JQuery中的美元符号和美元符号之间有什么区别? [英] What is the difference between a dollar sign and a dollar sign followed by a period in JQuery?
本文介绍了JQuery中的美元符号和美元符号之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在jQuery中,$
和$.
有什么区别?请尽可能提供实用的解释.
In jQuery, what is the difference between $
and $.
? Please provide a practical explanation if possible.
推荐答案
$
是对全局jQuery
对象的引用(如果要类推,则为同义词). $.<method>
调用jQuery
对象的静态方法,其中$(<selector>)
创建jQuery
对象的新实例.
$
is a reference (or synonym, if you want an analogy) to the global jQuery
object. $.<method>
calls a static method of the jQuery
object, where $(<selector>)
creates a new instance of the jQuery
object.
这篇关于JQuery中的美元符号和美元符号之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文