JS 获取元素的属性值,非内联样式时间:2023-03-09 09:43:22 //获取样式表的属性值,IE8及以下不兼容 ,方法 window.getComputedStyle(dom对象,"伪类").style属性; //IE8及以下获取样式表的属性值 ,属性 element.currentStyle.style属性; 判断浏览器是否兼容 getComputedStyle 和 currentStyle if( window.getComputedStyle ){ } else if( document.body.cyrrentStyle ){ }