Good afternoon! Home
I need a help to get the value of the previous div (red DIV01
)
What command can I use to get the result ?? Home
The above Div is the right parent element? Home
Sorry for the ignorance.
function onClick(){}
#DIV1{
width:300px;
height:300px;
background-color:red;
}
#DIV2{
width:200px;
height:200px;
background-color:blue;
}
<div id="DIV1">
<div id="DIV2">
<button onclick="onClick()"> teste </button>
</div>
</div>