2012-06-11 64 views
1

我在谷歌Chrome浏览器中测试这个javascript,它给了我一个错误:Uncaught SyntaxError:意外标识符。Sencha:Uncaught语法错误:意外标识符

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]); 
     }); 
    } 
}); 

回答

0

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

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]); 
    } 
}); 
相关问题