Hi guys, can you help me ? :(
I can get a style of an element just doing this:
alert (document.defaultView.getComputedStyle (document.getElementById ("element"), null).getPropertyValue ("background-color"));
I can get all styles of an element just doing this:
var styles = document.defaultView.getComputedStyle (document.getElementById ("element"), null);
var string = ""
for (var i = 0; i < styles.length; i ++) {
string = string + styles[i] + ": " + styles.getPropertyValue (styles[i]) + "\n";
}
alert (string);
But, how can i get only the specified styles of an element ? :(
Thank you o/