惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
InfoQ
博客园 - 司徒正美
爱范儿
爱范儿
F
Fortinet All Blogs
J
Java Code Geeks
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
SegmentFault 最新的问题
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
V
V2EX
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog

博客园 - edwin

如何用正确的方法来写出质量好的软件的75条体会 导出SQLServer数据到Excel中 - edwin - 博客园 去除衣物污渍大本营 和空姐同居的日子(大结局) 和空姐同居的日子(十五) 合空姐同居(十四) 和空姐同居的日子(十三) 和空姐同居的日子(十二) 和空姐同居的日子(十一) 和空姐同居的日子(十) 和空姐同居的日子(九) 和空姐同居的日子(八) 和空姐同居(七) 和空姐同居(六) 和空姐同居(五) 和空姐同居(四) 和空姐同居 (三) 与空姐同居的日子(第二节) 和空姐同居的日子
脚本如何得到鼠标坐标 - edwin - 博客园
edwin · 2006-05-17 · via 博客园 - edwin

JavaScript得到鼠标坐标代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JavaScript得到鼠标坐标</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Generator" content="EditPlus" />
<meta name="Author" content="Dicky">
<meta name="Keywords" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com">
<meta name="Description" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com">
<script language="javascript" type="text/javascript">
<!--
function document.onmousemove()
{
x.innerHTML = "相对位置:X:" + window.event.x + " Y:" + window.event.y;
y.innerHTML = "绝对位置:X:" + window.event.screenX + " Y:" + window.event.screenY;
}
//-->
</script>
</head>
<body>
<div id="x"></div>
<div id="y"></div>
</body>
</html>

VbScript得到鼠标坐标代码如下:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>VbScript得到鼠标坐标</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Generator" content="EditPlus" />
<meta name="Author" content="Dicky">
<meta name="Keywords" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com">
<meta name="Description" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com">
<script language="vbscript" type="text/vbscript">
<!--
Function GetMousePos()
x.innerHTML = "相对位置:X:" & window.event.x & "  Y:" & window.event.y
y.innerHTML = "绝对位置:X:" & window.event.screenX & "  Y:" & window.event.screenY
End Function
//-->
</script>
</head>
<body onmousemove="vbscript:GetMousePos()">
<div id="x"></div>
<div id="y"></div>
</body>
</html>

posted on 2006-05-17 17:20  edwin  阅读(1546)  评论()    收藏  举报