页面中有一个id为price的层,并且有一个id选择器price用来设置层price的样式,在IE浏览器中运行此页面,下面( )能正确获取层的背景颜色。(选择一项)


document.getElementById(price).currentStyle.backgroundColor

document.getElementById(price).currentStyle.background-color

document.getElementById(price).style.backgroundColor

var divObj=document.getElementById(pricedocument.defaultView.getComputedStyle(divObj,null).background;


点击这里跳转到答案查看网获取答案