The offsetY property returns the y-coordinate the mouse cursor, relative to the target element.
In this example, the red DIV is the target element.
Click inside the red DIV element: