顯示鼠標(biāo)坐標(biāo)
發(fā)布時間:2008-12-19 閱讀數(shù): 次 來源:網(wǎng)樂原科技
腳本說明:
第一步:把如下代碼加入區(qū)域中:
<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>
第二步:把中內(nèi)容改為: