在IE浏览器下可以通过什么方法获取元素的样式信息
可以使用element.currentStyle属性获取元素的样式信息。例如,可以使用以下代码获取id为example的元素的背景颜色:
var example = document.getElementById("example");
var bgColor = example.currentStyle.backgroundColor;
原文地址: https://www.cveoy.top/t/topic/cObI 著作权归作者所有。请勿转载和采集!