我想要文字文字跟踪鼠标的代码

来源:百度知道 编辑:UC知道 时间:2024/05/19 01:41:09
要是适用于新浪BLOG的

<SCRIPT language=javascript>
  <!--//This is a JS program for Sword Jin's JoyFM homepage.All rights reserved.
  var cx=0;
  var cy=0;
  var val=0;
  function locate()
  { cx=window.event.x;
  cy=window.event.y;

  }
  document.onmousemove=locate;
  function follow(i)
  { var x;
  if(i<4)x=cx-50+i*10;
  else x=cx-25+i*10;
  var y=cy-20+Math.floor(Math.random()*40);
  w=eval("word"+i);
  with(w.style)
  {
  left=x.toString()+"px";
  top=y.toString()+"px";
  }
  }
  function show(i)
  {
  var w=eval("word"+i);
  with(w.style)
  {
  visibility="visible";
  s=parseInt(fontSize);
  if(s>=200)s-=100;
  else if(s>90&&s<=100)
  {
  s-=85;
  clearInterval(val);
  if(i<5)val=setInterval("show("+(i+1)+")",20);
  }