晓东哥
人生就是一道命题,每个人的答案可能不尽相同,但你的内容中如果完全被物欲和世俗充斥,那你得到的一定不会是最好的结局。 -------晓东
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  阅读(1543)  评论(0)    收藏  举报