Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个 extjs 容器
var cont = Ext.create('Ext.container.Container',{ cls: 'myClass1', id: myId, flex: 1 });
如何在运行时使用 javascript/extjs 代码将 cls 属性更改为“MyClass2”?
如果SENSE.ui.createContainer做一个Ext.container.Container基类,那么你可以使用removeCls方法,如下:
SENSE.ui.createContainer
Ext.container.Container
removeCls
cont.removeCls ('MyClass1');
更多信息:Ext.container.Container.removeCls