js获取样式的兼容写法

1 var currentStyle = function(element){
2     return element.currentStyle || document.defaultView.getComputedStyle(element, null);
3 }
原文地址:https://www.cnblogs.com/gongshunkai/p/5837298.html