Workaround for currentStyle in Safari
Accessing an html element's current style u开发者_运维问答sing Element.currentStyle only exists in IE. Is there any easy workaround for Safari or other non-IE browsers?
For Safari I can get the current style using getComputedStyle like this:
window.getComputedStyle(element, null).width;
I found this here.
精彩评论