<style>
div {
position: absolute;
left: 0px;
top: 0px;
width: 100px;
height: 100px;
background: green;
}
</style>
<div id="div1">
div1
</div>
<div id="div2">
div2
</div>
<script>
window.onload = function () {
var div1 = document.getElementById('div1');
var div2 = document.getElementById('div2');
div1.onclick = function () {
alert('div1');
}
div2.onclick = function () {
div1.click();
}
}
</script>