鼠标的跳动文字

 <html>
<body> <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.οnmοusemοve=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);
  } 
 fontSize=s;
 }
 
}
function start()
{ for(i=1;i<=5;i++)
 {
 val=setInterval("show(1)",20);
 setInterval("follow("+i+")",100);
 
 }

//-->
</SCRIPT><SCRIPT language=javascript>
 var word=new Array(5);
 word[1]="嗨";word[2]="!";word[3]="大";word[4]="家";word[5]="好";
 for(i=1;i<=5;i++)
  document.write("<div id='word"+i+"' style='width:20px;height:20px;position:absolute;font-size:1000;visibility:hidden'><font face='Forte' color='#00FF00'>"+word[i]+"</font></div>");start();

 </SCRIPT>
</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值