function getStyle(obj, jsprop, cssprop) {
if (obj.currentStyle) {
return obj.currentStyle[jsprop];
} else if (window.getComputedStyle) {
return document.defaultView.getComputedStyle(obj, null).getPropertyValue(cssprop);
} else {
return null;
}
}
function changeElement() {
var obj = document.getElementById("myAnimalImg");
var ret = getStyle(obj, "top", "top");
alert(ret);
}
<< PREV :
[1] : ... [30] : [31] : [32] : [33] : [34] : [35] : [36] : [37] : [38] : ... [187] :
NEXT >>
Junios World