extjs中的OnReady

来源:互联网 发布:apache windows 编辑:程序博客网 时间:2024/05/17 22:01
API明确说明:onReady( Function fn, Object scope, boolean override ) : void Fires when the document is ready (before onload and before images are loaded). Shorthand of Ext.EventManager.onDocum...Fires when the document is ready (before onload and before images are loaded). Shorthand of Ext.EventManager.onDocumentReady. Parameters: fn : FunctionThe method the event invokesscope : ObjectAn object that becomes the scope of the handleroverride : booleanIf true, the obj passed in becomes the execution scope of the listenerReturns:void一般onReady都是给一个ExtJS Application的入口...就相当于C或Java的main函数.一般要求把创建ExtJs的组件放在onReady的方法里.如:Ext.onReady(function(){    var view = new Ext.Viewport(.....);})