hujingjian 发表于 2007-4-27 11:38:19

***鼠标特效***鼠标跟踪器

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
--------------------------------------------------------------------------------

脚本说明:
把如下代码加入<body>区域中
<script language="javascript">
<!--
b=document.all;
c=document.layers;
t1=new array("trail1.gif",38,35,"trail2.gif",30,31,"trail3.gif",28,26,"trail4.gif",22,21,"trail5.gif",16,16)
nos=parseint(t1.length/3)
rate=50
ie5fix1=0;
ie5fix2=0;
for (i=0;i<nos;i++){
createcontainer("cur"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+t1+"' width="+t1[(i*3+1)]+" height="+t1[(i*3+2)]+" border=0>")}

function createcontainer(n,xp,yp,w,h,at,ht,op,st){
with (document){
write((!b) ? "http://code.ik8.com/html/+T1+<layer id='"+n+"' left="+xp+" top="+yp+" width="+w+" height="+h : "<div id='"+n+"'"+" style='position:absolute;left:"+xp+"; top:"+yp+"; width:"+w+"; height:"+h+"; ");
if(st){
if (c)
write(" style='");
write(st+";' ")
}
else write((b)?"'":"");
write((at)? at+">" : ">");
write((ht) ? ht : "");
if (!op)
closecontainer(n)
}
}
function closecontainer(){
document.write((b)?"</div>":"</layer>")
}
function getxpos(n){
return (b) ? parseint(b.style.left) : c.left
}
function getypos(n){
return (b) ? parseint(b.style.top) : c.top
}

function movecontainer(n,dx,dy){
c=(b) ? b.style :c;c.left=dx;c.top=dy
}
function cycle(){
//if (ie5)
if (document.all&&window.print){
ie5fix1=document.body.scrollleft;
ie5fix2=document.body.scrolltop;
}
for (i=0;i<(nos-1);i++){
movecontainer("cur"+i,getxpos("cur"+(i+1)),getypos("cur"+(i+1)))
}
}
function newpos(e){
movecontainer("cur"+(nos-1),(b)?event.clientx+ie5fix1:e.pagex+2,(b)?event.clienty+ie5fix2:e.pagey+2
)
}
if(document.layers)
document.captureevents(event.mousemove)
document.onmousemove=newpos
setinterval("cycle()",rate)

//-->


</script>



      










--------------------------------------

http://www.huoyue.com.cn 活跃网,活跃人群的论坛,访问活跃网,将给您带来意想不到的收获,还可以免费为您开论坛,让您免费拥有与朋友、网友交流的论坛。你是年轻人吗?你活跃你就上!
页: [1]
查看完整版本: ***鼠标特效***鼠标跟踪器