92、显示鼠标运动的轨迹

92、显示鼠标运动的轨迹

脚本说明:

<script>

var x=1;

var y=1;

var linestr="";

var intCharTotal=0;

function drawdot(){

var str="";

x=event.x;

y=event.y;

linestr+="<div style=\"position:absolute;left:"+x+"px;top:"+y+"px;width:1;height:1;background:red;font-size:0\"></div>";

intCharTotal+=1;

}

function drawall(){

document.write (linestr);

document.close();

window.status=intCharTotal;

}

document.onclick=drawall;

document.onmousemove=drawdot;

</script>

 

Write a comment

Comments: 0