There is element in HTML: <div id="block"></div>
, and it's property via CSS:
#block {
background: red;
}
If I want to assign in JavaScript to some variable a property from CSS, like this:
var value = document.getElementById('block').style.background // It doesn't work
How can I solve this problem?