extjs
2010-09-11 29 views 0 likes 
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說對象不支持此屬性或方法。什麼是狡猾的喲?

回答

1

在ExtJs論壇上看到這個post

相關問題