1.如何动态修改panel里的html值
Ext.getCmp(‘panel1’).body.update('<iframe scrolling="auto"
frameborder="0" width="100%" height="100%"
src="PagingGrid11.jsp"></iframe>
');
2.如何将已有HTML作为panel的body元素
contentEl 属性,值为元素的ID
extjsAPI 写道
Specify an existing HTML element, or the id of an existing HTML element to use as the content for this component.
This config option is used to take an existing HTML element and place it in the layout element of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.
Notes:
The specified HTML element is appended to the layout element of the component after any configured HTML has been inserted, and so the document will not contain this element at the time the render event is fired.
The specified HTML element used will not participate in any layout scheme that the Component may use. It is 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.
This config option is used to take an existing HTML element and place it in the layout element of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.
Notes:
The specified HTML element is appended to the layout element of the component after any configured HTML has been inserted, and so the document will not contain this element at the time the render event is fired.
The specified HTML element used will not participate in any layout scheme that the Component may use. It is 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.
本文介绍了使用ExtJS框架动态修改Panel内的HTML值的方法,并详细解释了如何利用contentEl属性来指定现有HTML元素作为Panel的body内容。文章还特别注意到了在操作过程中的一些注意事项。
1939

被折叠的 条评论
为什么被折叠?



