<html>
<head>
<meta charset="UTF-8">
</head>
<!--//获取鼠标点击事件发生时的鼠标指针相对于浏览器窗口的坐标-->
<!--<body onmousedown="show_coords(event)">-->
<!--<p>请在文档中点击。一个消息框会提示出鼠标指针的 x 和 y 坐标。</p>-->
<!--<script type="text/javascript">-->
<!-- function show_coords(event)-->
<!-- {-->
<!-- console.log(event)-->
<!-- x=event.clientX-->
<!-- y=event.clientY-->
<!-- alert("X 坐标: " + x + ", Y 坐标: " + y)-->
<!-- }-->
<!--</script>-->
<!--</body>-->
<!--//获取鼠标移动事件中,鼠标位于页面本身的水平和垂直坐标-->
<!--<body onmousemove="show(event)">-->
<!-- <script>-->
<!-- function show(event) {-->
<!-- console.log(event);-->
<!-- console.log(`X坐标:${eve