What is the role of clientY Mouse Event in JavaScript?

When a mouse event is triggered, the clientY mouse event property is used to get the vertical coordinate of the mouse pointer. This is according to the current window.


You can try to run the following code to learn how to implement clientY Mouse event in JavaScript.

<!DOCTYPE html>
      <p onclick = "coordsFunc(event)">Click here to get the x (horizontal) and y (vertical) coordinates (according to current window) of the mouse pointer.</p>
         function coordsFunc(event) {
            var x_coord = event.clientX;
            var y_coord = event.clientY;
            var xycoords = "X coords= " + x_coord + ", Y coords = " + y_coord;