1

我正在谷歌 Chrome 浏览器中测试这个 javascript,它给了我一个错误:Uncaught SyntaxError: Unexpected Identifier。

    Ext.application({
    name: 'Sencha',
    launch: function() {
        Ext.create("Ext.tab.Panel",{
        fullscreen: true,
         tabBarPosition: 'bottom',

        var image = Ext.widget('image',{
            xtype: "image",
            src: "images.jpg",
            scope: this
        });
    this.add([image]);
        });
    }
});
4

2 回答 2

0

通过 JSLint 运行您的代码。你有语法错误!

于 2013-01-08T21:55:06.503 回答
0

你有语法错误。尝试这个 :

Ext.application({
    name: 'Sencha',
    launch: function() {
        Ext.create("Ext.tab.Panel",{
            fullscreen: true,
            tabBarPosition: 'bottom'
        });

        var image = Ext.widget('image',{
            xtype: "image",
            src: "images.jpg",
            scope: this
        });

        Ext.Viewport.add([image]);
    }
});
于 2013-03-06T16:15:08.973 回答