Take the 2-minute tour ×  I have a div  <div class="blue>;  The
class blue is:      .blue {           background-color: blue;
Now I know I can set the background color of the div in the
console using:        $0.style.backgroundColor = "#ffcc00"  But
what if I want to get the value of the background color for that
element using the console?  share|improve this question add
comment  2 Answers  It's possible you may want computed style:
var style = getComputedStyle(document.body, null); // Gets the
style for a passed element and optional pseudo selecter (eg.
:hover)  It's important to note that computed style is the
rendered result. If you have multiple rules for the same
element, this will only display the ones that have been applied.
share|improve this answer add comment  You can do :  var blue =
document.getElementsByClassName('blue')[0];   or you do:
share|improve this answer i hope you noticed the console
executes javascript and no special command syntax –  pfried Oct
25 '12 at 18:08 add comment  Your A