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