[code="js"] items:[
{contentEl:'script', title: 'Short Text'},
{contentEl:'markup', title: 'Long Text'}
]
[/code]
下面是api的说明,意思就是这个对象的内容来自contentEl指定的ID 的Dom对象里面的内容,比如我有一个id为 aa的元素在页面里面,aa元素里面有文本'abc',那么contentEl:'aa' 这样的话,这个对象就会把'abc'作为他的内容
contentEl : String
Specify the id of an existing HTML node to use as the panel's body content (defaults to ''). Description : <div clas...
* Description :
This config option is used to take an existing HTML element and place it in the body of a new panel (it simply moves the specified DOM element into the body element of the Panel when the Panel is rendered to use as the content (it is not going to be the actual panel itself).
* Notes :
The specified HTML Element is appended to the Panel's body Element by the Panel's afterRender method after any configured HTML has been inserted, and so the document will not contain this HTML at the time the render event is fired.
The specified HTML element used will not participate in any layout scheme that the Panel may use. It's just HTML. Layouts operate on child items.
Add either the x-hidden or the x-hide-display CSS class to prevent a brief flicker of the content before it is rendered to the panel.
看这里的讨论帖,可能更清楚点
[quote]
EXT2.0中的 el 和 contentEl 到底有什么区别呢?
http://www.iteye.com/topic/166608
[/quote]
contentEl : String
一个已存在的HTML节点的id,它被当作panel的body元素内容来使用(默认值为 '')。
朋友,这有个ext js 2.2的中文文档,去下载来查吧
http://www.iteye.com/topic/413120
可以这么理解:contentEl:'script'
[code="java"]