js获取样式的兼容写法时间:2021-05-09 21:19:48 var currentStyle = function(element){ return element.currentStyle || document.defaultView.getComputedStyle(element, null); }