开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜