tryit_view.asp@filename=try_dom_event_clientxy

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

ASP@FILENAME=TRY_DOM_EVENT_CLIENTXY
19
字号
<html>
<head>
<script type="text/javascript">
function show_coords(event)
{
x=event.clientX;
y=event.clientY;
alert("X coords: " + x + ", Y coords: " + y);
}
</script>
</head>

<body onmousedown="show_coords(event)">

<p>Click in the document. An alert box will alert the x and y coordinates of the mouse pointer.</p>

</body>
</html>

⌨️ 快捷键说明

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