Good time!
There is a code:
function showareabtn(el) { el.stopPropagation(); console.log(el); var x = el.originalEvent.layerX; var y = el.originalEvent.layerY; alert(x + " x " + y); } .areacol { width: 500px; height: 300px; overflow: hidden; background: #F00; } <div class="areacol" onclick="javascript:showareabtn(this);"></div> The script should display the coordinates of the click, but it gives an error, please tell me what is wrong?