Read imported style properties
function getElementStyle(elemID, IEStyleProp, CSSStyleProp)
{
var elem = document.getElementById(elemID);
if (elem.currentStyle) {
return elem.currentStyle[IEStyleProp];
} else if (window.getComputedStyle) {
var compStyle = window.getComputedStyle(elem, "");
return compStyle.getPropertyValue(CSSStyleProp);
}
return "";
}
This solution was found at:
oreillynet


0 Comments:
Skicka en kommentar
<< Home