Hello am applying onclick function inside onclick function, but the function which I am performing on parent is also applying on child div, how to to prevent that function on child. In my code I redirecting on google.com by click on red box but when I click on blue box is alos going on google.com how to prevent this option
my code
function parent(){
window.location.href='https://www.google.com/';
}
function child(){
alert('Hello this is the blue button');
}
<div style="background: red; padding: 50px; height:200px; width:500px; " onclick="parent()">
<div style="background: blue; padding: 5px; color:white;" onclick="child()">Click me</div>
</div>