1
这可能是一个愚蠢的问题,但在这里。何时在方格中使用方括号和大括号?
我一直在关注sencha touch 2应用程序上的this tutorial。我对Ext JS非常陌生,我无法理解何时使用square brackets : [ .. ]
或curly brackets : { .. }
。
Ext.define("NotesApp.view.NotesListContainer", {
extend: "Ext.Container",
config: {
items: [{
xtype: "toolbar",
docked: "top",
title: "My Notes",
items: [{
xtype: "spacer"
}, {
xtype: "button",
text: "New",
ui: "action",
id:"new-note-btn"
}]
}]
}
});
而且喜欢这里
html: [
'<img src="http://staging.sencha.com/img/sencha.png" />',
'<h1>Welcome to Sencha Touch</h1>',
"<p>You're creating the Getting Started app. This demonstrates how ",
"to use tabs, lists and forms to create a simple app</p>",
'<h2>Sencha Touch 2</h2>'
].join("")
谁能帮我正确使用卷曲,括号,而编码煎茶触摸?
为什么不直接用花括号{..}为什么ext js必须和{..}一起使用[..]?
你可能会感兴趣的是采取一个基本的JavaScript课程。因为这些东西是非常基本和必不可少的。 http://nfriedly.com/techblog/2009/06/advanced-javascript-objects-arrays-and-array-like-objects/ – 2013-04-18 06:46:50
好吧,我做了w3schools的基本课程......没有遇到像这样的大括号。总之,感谢您的链接,我会通过它。除了陷入煎茶之前,还有其他什么“基本”话题应该讨论吗? – 2013-04-18 06:54:31