tryit_view.asp@filename=try_dom_event_screenxy

来自「W3Schools tutorial..web designing」· ASP@FILENAME=TRY_DOM_EVENT_SCREENXY 代码 · 共 22 行

ASP@FILENAME=TRY_DOM_EVENT_SCREENXY
22
字号
<html>
<head>

<script type="text/javascript">
function coordinates(event)
{
x=event.screenX;
y=event.screenY;
alert("X=" + x + " Y=" + y);
}

</script>
</head>
<body onmousedown="coordinates(event)">

<p>
Click somewhere in the document. An alert box will alert the x and y coordinates of the cursor, relative to the screen.
</p>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?