日期:2008-08-30  浏览次数:20813 次

<style>
<!--
#leftright, #topdown     {
    position:absolute;

    left:200;
    top:200;
    width:1px;
    height:1px;
    background-color:black;
    z-index:100;
    font-size:1px;
    }
-->
</style>
<script language="JavaScript">
<!--
function followmouse1()
{
//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+event.clientY+20
topdown.style.pixelTop=document.body.scrollTop+20
if (event.clientX<document.body.clientWidth-20)
topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+20
else
topdown.style.pixelLeft=document.body.clientWidth-20
}
function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}
if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
</script>

<div id="leftright" style="width:expression(document.body.clientWidth-200)"></div>
<div id="topdown" style="height:expression(document.body.clientHeight-200)"></div>