/ Published in: JavaScript
URL: http://www.quirksmode.org/dom/getstyles.html
Expand |
Embed | Plain Text
function getStyle(el,styleProp) { var x = document.getElementById(el); if (x.currentStyle) var y = x.currentStyle[styleProp]; else if (window.getComputedStyle) var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp); return y; }
You need to login to post a comment.
