返回主页网页素材图库gif动画图库网页模板网页教程网页特效网页背景音乐网页制作软件下载网页设计字体下载透明FLASH素材
 


网页鼠标特效
显示鼠标坐标:在方框中显示鼠标在页面的坐标
 
效果演示:
X: Y:
第一步:把如下代码加入<body>区域中:
<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 TYPE="TEXT" NAME="x" SIZE="4"> Y: <INPUT
TYPUE="TEXT" NAME="y" SIZE="4">
</FORM>
第二步:把<body>中内容改为:
<body onMousemove="micro$oftMouseMove()">

 友情连接
 
© CopyRight 2002-2003, www.dabaoku.com, Inc. All Rights Reserved