0
A very stripped down example here。使用IE7上的ExtJS選擇Style屬性
代碼:
function changeBackground() {
var testDiv = Ext.get("test");
var allStyleDivs = testDiv.select("*[style*='background-color'], *[style*='BACKGROUND-COLOR']");
allStyleDivs.each(replaceBackground);
}
function replaceBackground(element) {
element.setStyle('background-color','blue');
}
在FF,IE8,Chrome的這個頁面正常工作。 IE7說對象不支持此屬性或方法。什麼是狡猾的喲?