• 2022-05-31
    页面中一个id为price的层,使用id选择器设置层price的样式,在IE浏览器中运行此页面,下列代码中,()能正确获取层的背景颜色。
    A: document.getElementById("price").currentStyle.backgroundColor
    B: document.getElementById("price").currentStyle.background-color
    C: document.getElementById("price").style.backgroundColor
    D: var divObj=document.getElementById("price");document.defaultView.getComputedStyle(divObj,null).background;