Get Ext JS version
I have taken over a PHP + Ext JS project. Unfortunately, there is no documentation. How do I find out the Ext JS version that is being used?
In jQuery, we get the ver开发者_StackOverflow社区sion by running $().jquery;. Anything like this in Ext JS?
Two easy ways to do this. First is from a web browser's console..
In ExtJS 3.x:
Ext.version;
In ExtJS 4.0:
Ext.getVersion('extjs');
In >= ExtJS 4.1
Ext.getVersion().version;
Or you can look in the ext-all-debug.js and check the version number at the top of the script. In all versions dating back to 1.0 they include the version number at the top of the ext-all-debug script, it might be called something else but just have a look around your application hierarchy.
Since ExtJS 4.1.1:
Ext.getVersion().version;
http://docs.sencha.com/ext-js/4-0/#/api/Ext.Version-method-getVersion
var ver = Ext.getVersion('core');
            if (ver.isLessThan('4.0.1')) {
                Ext.Msg.show({
                   title: 'Err',
                   msg: 'Old version',
                   buttons: Ext.Msg.OK,
                   icon: Ext.Msg.ERROR
               });
put this in javascript function.
            var majorVersion;
        var fullVersion;
        if (Ext.version != undefined) {
            majorVersion = Ext.version.substring(0, Ext.version.indexOf("."));
            fullVersion = Ext.version;
        } else {
            majorVersion = Ext.getVersion().getMajor();
            fullVersion = Ext.getVersion().version;
        }
        alert("Ext version:"+majorVersion+" "+fullVersion);
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论