Click in the document. An alert box will alert the x and y coordinates of the cursor.
Your Result:
上のテキストを編集し、クリックして結果を見てください。
W3Schools.com
- Try it yourself