var panel = new Ext.Panel(
{
id:'hwq',
renderTo:'div',
title:'Test',
html:"<div id='getValue'>hwq</div>"
});
Ext.fly(Ext.get("getValue").dom.id).applyStyles("background-color:#ff0000");
本文介绍如何使用 ExtJS 创建面板并应用样式。通过实例代码展示了创建一个名为 'hwq' 的面板,并将其渲染到指定的 div 中。此外,还演示了如何通过 Ext.fly 和 applyStyles 方法为指定元素应用背景颜色。
var panel = new Ext.Panel(
{
id:'hwq',
renderTo:'div',
title:'Test',
html:"<div id='getValue'>hwq</div>"
});
Ext.fly(Ext.get("getValue").dom.id).applyStyles("background-color:#ff0000");

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