function getStyle(Selector, Property, Value, StyleSheetIndex) {
var Selectors = document.styleSheets[StyleSheetIndex].rules;
for (var i = 0; i < Selectors.length; i++) {
if (Selectors[i].selectorText == Selector) {
alert(Value + " " + Property);
Selectors[i].style[Property] = "url(" + Value + ")";
}
}
}
其中Selector = "body", Property="backgroundImage", value="/images/bg.jpg",StyleSheetIndex = 2,但是这里的属性值没有变化。谁能告诉我为什么?