怎么获取jquery版本

    技术2022-07-11  119

    怎么获取jquery版本

    Many JavaScript frameworks provide a version property on their main object, providing a quick bit of important information about the framework.  The main jQuery object doesn't provide this property, however, so developers need to do a bit more work to get that version information.  Here's how to get the jQuery version number for a given jQuery script!

    许多JavaScript框架在其主要对象上提供了version属性,从而提供了有关该框架的一些重要信息。 但是,主要的jQuery对象不提供此属性,因此开发人员需要做更多的工作才能获得该版本信息。 这是获取给定jQuery脚本的jQuery版本号的方法!

    jQuery JavaScript (The jQuery JavaScript)

    The jQuery version lives within jQuery.fn:

    jQuery版本位于jQuery.fn :

    var v = jQuery.fn.jquery; /* You may also use: var v = jQuery().jquery; // "1.4.2" */

    The jquery property of the jQuery.fn object provides the version number as a string.  Not as easy as .version access, but provides the jQuery version nonetheless!

    jQuery.fn对象的jquery属性以字符串形式提供版本号。 虽然不如.version访问那么容易,但是仍然提供了jQuery版本!

    翻译自: https://davidwalsh.name/jquery-version

    怎么获取jquery版本

    相关资源:jdk-8u281-windows-x64.exe
    Processed: 0.010, SQL: 9