javascript 如何找出我使用的 jQuery 版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12423864/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 16:09:52  来源:igfitidea点击:

How can I find out what jQuery version I’m using?

javascriptjquery

提问by uidesigner

My page loads jQuery. Is there any way to find out which version of jQuery that is?

我的页面加载 jQuery。有没有办法找出哪个版本的jQuery?

回答by dsgriffin

You can use either $().jquery;or $.fn.jquery

您可以使用$().jquery;$.fn.jquery

Which will return a string containing the version number, e.g. 1.6.2.

这将返回一个包含版本号的字符串,例如 1.6.2。

回答by Cristiano Fontes

Just open Chrome Console or Firebug and type while in your page

只需打开 Chrome 控制台或 Firebug 并在页面中输入

$().jquery;

回答by Sudhir Bastakoti

you can do:

你可以做:

alert($().jquery);

回答by Vincent Thibault

You can know the version by using:

您可以使用以下方法了解版本:

jQuery.fn.jquery