<!DOCTYPE html>
<html lang="en-US">
<body>
<h2 onclick="myFunction(event)" onclick="myOtherFunction()">click me</h2>
<script>
function myFunction(e){
alert("alert 1");
e.stopImmediatePropagation();
alert("alert 2");
}
function myOtherFunction(){
alert("alert 3");
}
</script> </body>
</html>