1
Good afternoon !
I need some help to get the value of the previous div (red DIV01
)
What command can I use to get the result??
The previous Div is the right parent element?
Excuse 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>
What value you need?
– Woss
Of the ID of
DIV01
, who can get the ID of the previous div– Sora