其實只是一個模擬
怎樣讓鼠標消失呢
這裡是我們需要的兩個素材
透明cur
鼠標圖片
ok
<!DOCTYPE html PUBLIC
<html xmlns=
<head>
<style type=
body{
cursor:url(
}
</style>
<script type=
function $I(id){
return typeof(id)==
};
var isMoving=false;
window
$I(
$I(
document
e=e||event;
if(!isMoving){
$I(
$I(
}
};
document
e=e||event;
if(isMoving){
e
}
};
$I(
alert(
};
window
if(!isMoving){
move(parseInt($I(
parseInt($I(
parseInt($I(
}
}
}
function getAngle(startX
{
var angle;
var tanx;
if(endX
tanx=Math
}else{
return
}
angle=Math
if(endX
angle=
}
if(endX
angle+=
}
if(endX
angle=
}
return angle;
};
function move(startX
var currentDistance=
var currentX=startX;
var currentY=startY;
var angle=getAngle(startX
var speed=
var intervalId=window
if(Math
|| Math
var newX
var xAngle=angle*(
var xDirection=Math
var yDirection=Math
if(Math
var deltaX=Math
newX=currentX+deltaX;
newY=
}
else{
var deltaY=Math
newY=currentY
newX=
}
currentX=newX;
currentY=newY;
$I(
$I(
isMoving=true;
}
else{
window
isMoving=false;
$I(
$I(
}
}
}
</script>
</head>
<body>
<input type=
<div ></div>
<img id=
</body>
</html>
From:http://tw.wingwit.com/Article/program/net/201311/11781.html