效果请看状态栏: <script language="javascript"> var where = ""; // which link function checkwhere(e) { if (document.layers){ xCoord = e.x; yCoord = e.y; } else if (document.all){ xCoord = event.clientX; yCoord = event.clientY; } else if (document.getElementById){ xCoord = e.clientX; yCoord = e.clientY; } self.status = "X座标值= "+ xCoord + " Y座标值= " + yCoord + " ---欢迎你的光临"; } document.onmousemove = checkwhere; if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);} </script>
状态栏显示鼠标座标
最新推荐文章于 2023-10-13 17:14:50 发布