瀏覽器兼容問題
var cssnew=document.styleSheets[0].cssRules || document.styleSheets[0].rules || window.CSSRule.STYLE_RULE; cssnew[1].style.left=div.offsetLeft+speed+'px'; ie7 和火狐不會報錯 360瀏覽器回報:Cannot read property 'style' of undefined 請問有什么解決的辦法
var cssnew=document.styleSheets[0].cssRules || document.styleSheets[0].rules || window.CSSRule.STYLE_RULE; cssnew[1].style.left=div.offsetLeft+speed+'px'; ie7 和火狐不會報錯 360瀏覽器回報:Cannot read property 'style' of undefined 請問有什么解決的辦法
2015-06-09
舉報
2015-06-10
我經過半天測試發(fā)現(xiàn)360
直接 ?var box=docunment.getElmentsById('box')
box.style.width=30+px";
就可以解決
2015-06-09
document.cssnew[1]