function alertOuter() {
alert("outer alert")
}
function alertInner() {
alert("inner alert")
return
}
<div onclick="alertOuter()" style="padding:20px;background:red;">
<h1>Outer</h1>
<br/>
<button onclick="alertInner()">Inner</button>
</div>
I have two function calls on onclick event.
I want to prevent alertOuter function when clicking on the button.
But, it is calling both the functions when i am clicking on the button.
I wants to prevent that alertOuter funcion when clicking on the button just wants to call alertInner() function
How can I do that?