Source Code:
(back to article)
Submit
Result:
Report an issue
9
1
2
3
4
›
⌄
<
div
onclick=
"
alert(
'You clicked the DIV!'
);
"
>
Click me or one of my children:
<
p
onclick=
"
alert(
'You clicked the P!'
);
"
>Click me!</
p
>
</
div
>
<div onclick="alert('You clicked the DIV!');"> Click me or one of my children: <p onclick="alert('You clicked the P!');">Click me!</p> </div>