Simple example:

<div style="background-color: #ff0000; width: 300px; height: 200px" onclick="test(this)" id="test">
TEST <br><br>

<div style="background-color: #000ff0; width: 200px; height: 100px" onclick="test(this)" id="hello">
Hello!!!
<div>
</div>

<script>
function test(obj) {
alert(obj.id);
}
</script>

When I click on the blue div I see two alerts "hello" and "test". When I click on the 'blue' div I need to get the alert only from the blue div (from the higher layer).