function getStyle(obj, attr) { if (obj.currentStyle) { return obj.currentStyle[attr]; } else { return document.defaultView.getComputedStyle(obj, null)[attr]; } } 相关文章: 2021-04-05 2022-12-23 2022-12-23 2022-12-23 2022-12-23 2021-10-02 2021-12-09