为什么我没有使用此代码获取ExtJs消息框?

时间:2012-05-10 02:32:35

标签: javascript extjs

Ext.application({ 
    name: 'HelloExt', 
    launch: function() { 
        Ext.MessageBox.alert('title', 'msg', Ext.emptyFn); 
    } 
});

1 个答案:

答案 0 :(得分:0)

有错误信息吗?我的第一个猜测是你正在使用动态加载,并且在使用它之前没有加载MessageBox:

Ext.application({
    name: 'HelloExt',
    requires: ['Ext.window.MessageBox'],
    launch: function() {
        Ext.MessageBox.alert('title', 'msg', Ext.emptyFn);
    }
});