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.
例如,
<div class="level1"> </div>
我需要搜索类名以 level 开头的元素,并以编程方式将它们替换为“level2”。如何在 extjs 中做到这一点?
就是这样。查看各种功能的文档以了解如何适应。
var targets = Ext.query('.level1'); Ext.each(targets, function(domEl) { Ext.fly(domEl) // get a reference to Ext.Element from the raw ROM element .removeCls('level1') .addCls('level2'); });