How do I select the color of the div element's backGround?
Note: Using javascript
var cor;
cor = document.getElementById(id).style.backgroundColor;
#bloco1 {
width: 280px;
height: 120px;
border: 1px dashed black;
position: relative;
background-color: blue;
}
<!DOCTYPE html>
<html lang 'pt-br'>
<head>
<title>Pintar</title>
</head>
<body>
<div id='bloco1' onclick='selecionarCor(this.id)'></div>
</body>
</html>