HTML DOM Event对象screenX事件属性

screenX 事件属性可返回事件发生时鼠标指针相对于屏幕的水平坐标。

例子:

<html><head><script type="text/javascript">function showPositionInScreen(event){x=event.screenXy=event.screenYalert("你点击的地方在屏幕上的坐标为:("+x+","+y+")")}</script></head><body onmousedown="showPositionInScreen(event)"><p>来来来,随便点击一下,就告诉你点击了电脑屏幕的具体位置啦,,不要问我为啥知道,任性,就是知道</p></body></html>

如果前世五百次眸回,才换来今生的擦肩而过。

HTML DOM Event对象screenX事件属性

相关文章:

你感兴趣的文章:

标签云: