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