加入收藏 - 网站地图 - 网站搜索 -
阅读新闻

显示鼠标坐标信息

[日期:12-25] 来源:  作者: [字体: ]

<html>
<head>
<title>网页特效|Linkweb.cn/Js|---显示鼠标坐标</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body onMousemove="micro$oftMouseMove()">
<br>
<br>
<center> </center>
<br>
<center>
<table border=1 bordercolor=#000000 borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0">
<tr><td align=center><font size=5 color=red face="华文中宋">
  <strong style="font-weight: 400">下面框中为脚本显示区</strong></font></td></tr>
<tr><td align=center height=80>
<SCRIPT LANGUAGE="JavaScript">
if (navigator.appName == 'Netscape')
 {
 document.captureEvents(Event.MOUSEMOVE);
 document.onmousemove = netscapeMouseMove;
}

function netscapeMouseMove(e) {
if (e.screenX != document.test.x.value && e.screenY != document.test.y.value)
 {
 document.test.x.value = e.screenX;
 document.test.y.value = e.screenY;
}
}

function micro$oftMouseMove() {
if (window.event.x != document.test.x.value && window.event.y != document.test.y.value)
 {
 document.test.x.value = window.event.x;
 document.test.y.value = window.event.y;
}
}
</SCRIPT>
<FORM NAME="test">
X:
<INPUT NAME="x" SIZE="4" style="border: 1px solid #000000"> Y:
<INPUT
TYPUE="TEXT" NAME="y" SIZE="4" style="border: 1px solid #000000">
</FORM>
</td></tr></table></center>
<br>
<br>
<center>

<SCRIPT LANGUAGE="JavaScript">

<!-- hide
function goHist(a)
{
   history.go(a);
}
//-->
</script>
</center>

</body>
</html>



评论 】 【 推荐 】 【 打印
上一篇:CSS打造多彩文字链接
下一篇:类似Windows自定义过的鼠标
相关新闻