这两个单词在jQuery中有什么区别 [英] What is the difference between these two word in jQuery

查看:82
本文介绍了这两个单词在jQuery中有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取页面在警报中使用的jQuery版本。它非常完美:

I am trying to get the version of jQuery a page is using in an alert. It works perfect:

我使用 alert(jQuery.prototype.jquery)

现在我的问题是jQuery和jquery单词在原型之前和之后指定的区别是什么。

Now my question is what is the difference between jQuery and jquery words here that are specified before and after prototype.

哪一个是由$指定的。

推荐答案

全局 $ jQuery 变量只指向同一个函数对象,它们是别名。 jquery 只是原型对象属性的名称。这两个名字彼此无关 - 它们是不同对象上不同属性的名称。

The global $ and jQuery variables just point to the same function object, they are "aliases". jquery is just the name of the property of the prototype object. The two names have nothing to do with each other - they are names of different properties on different objects.

这篇关于这两个单词在jQuery中有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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