document.onmousemove=function(e){
var e=e?e:window.event;
var posx=e.clientx;
var posy=e.clienty;
document.images[0].style.left=posx+"px";
document.images[0].style.top=posy+"px";
}
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
document.onmousemove=function(e){
var e=e?e:window.event;
var posx=e.clientx;
var posy=e.clienty;
document.images[0].style.left=posx+"px";
document.images[0].style.top=posy+"px";
}
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
《鼠标跟随效果代码.doc》
下载本文的Word格式文档,以方便收藏与打印。