i want to get all the style applyed to an element e.g like in chrome developer tool you have seen at top right section called "Computed Style" i want to get all the list is there any other simple way to get all the list and property
Source Code
i tried this javascript but it is not what i want, i have to manual write css property
i just want all the style applied to a element earlier or by default
Try using this function (updated your jsFiddle);
function getComputedStyle(elm, style) {
var computedStyle;
if (typeof elm.currentStyle != "undefined") {
computedStyle = elm.currentStyle;
}
else {
computedStyle = document.defaultView.getComputedStyle(elm, null);
}
return computedStyle[style];
}
getComputedStyle()
function is from I does Javascript!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With