The offsetX property returns the x-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:
The x-coordinate, relative to the left edge of the DIV element is: