2012-06-11 93 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]); 
    } 
}); 
相關問題