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