打字效果

<div align="center" id="myexample" style="border:5px ridge red; width:650px">!NUl*` I(y/Aq9`9Y/x
!iO"l@Tw)Y#@2s-| R w
<h2><span id="fly" style="color:7b007b"></span></h2>q7n i%VL'yD;y
<script>
z,F |;IcnP'\ window.onerror=new Function("return true")1K` n+N`a

q#P hM%]P$g message ='☆总有一个人,会让你心动总有一段往事,会让你感动,总有一个音符,能够触动你的神经,穿透你的内心,慰藉你的灵魂.当眼里漾起忘不掉的从前,我们流泪了…… 在心如锈铁的时代,还有没有一首歌,曾让你感动过? 记忆和我们成长,让我们一起看着它不朽……☆';
j-GNH;G`'W"L
7D4G$n!{-o ?~ distance = 50;
.siY%z%mb K speed = 500;*^c|4Y@;e)~o!r
if (!document.all)!F5eDp$P8Z~
document.write('<h2>'+message+'</h2>')
;O3OM*P5P|9Q|8H\ 5TC@8z!Og H
</script>
$Ic+nZ p6h;J
a7t?-a+N5J <script language="JavaScript1.2">
.QPf@ ce^$K!d9`
:S\6O r @ txt="";num=0;num4=0;flyofle="";flyofwi="";flyofto=""7[Z%~okW
function stfly(){for(i=0;i != message.length;i++){if(message.charAt(i) != "$"){txt=txt+"<span style='position:relative;visibility:hidden;' id='n"+i+"'>"+message.charAt(i)+"<\/span>"};else{txt=txt+"<br>"}};fly.innerHTML=txt;txt="";flyofle=fly.offsetLeft;flyofwi=fly.offsetWidth;flyofto=fly.offsetTop;fly2b()}
7bgf#i&R[5y'mc function fly2b(){if(num4 != message.length){if(message.charAt(num4) != "$"){eval("n"+num4+".style.left=flyofle-n"+num4+".offsetLeft+flyofwi/2");eval("n"+num4+".style.top=flyofto-n"+num4+".offsetTop+distance");eval("fly3('n"+num4+"',eval(n"+num4+".style.left.substring(0,n"+num4+".style.left.length-2)),(eval(n"+num4+".style.left.substring(0,n"+num4+".style.left.length-2))/5),eval(n"+num4+".style.top.substring(0,n"+num4+".style.top.length-2)),(eval(n"+num4+".style.top.substring(0,n"+num4+".style.top.length-2))/5))")};num4++;setTimeout("fly2b()",speed)}}
.o-UD"K/z function fly3(target,lef2,num2,top2,num3){if((Math.floor(top2) != 0 && Math.floor(top2) != -1) || (Math.floor(lef2) != 0 && Math.floor(lef2) != -1)){if(eval("'"+lef2+"'").charAt(0) != '-'){lef2=lef2-num2};else{lef2=lef2+(-num2)};if(Math.floor(lef2) != -1){eval(target+".style.visibility='visible';"+target+".style.left=Math.floor(lef2)")};else{eval(target+".style.visibility='visible';"+target+".style.left=Math.floor(lef2+1)")};if(eval("'"+lef2+"'").charAt(0) != '-'){top2=top2-num3};else{top2=top2+(-num3)};if(Math.floor(top2) != -1){eval(target+".style.top=Math.floor(top2)")};else{eval(target+".style.top=Math.floor(top2+1)")};setTimeout("fly3('"+target+"',"+lef2+","+num2+","+top2+","+num3+")",50)}};"t2x*r-ZT
stfly()A Z].R%{*Mr xTJ
</script></div>9qP Kr;D4y4Y4yF G
<script language="JavaScript1.2">[ y/Ov Id k
function flashit(){r;XS(_*g
if (!document.all)
B"r)n*r%}2c H return
Kz-@x'S3Y if (myexample.style.borderColor=="fuchsia")
1E!m CKs/h myexample.style.borderColor="yellow"
8kFRPT`%x&Qf{ else
5tg\6?X"y?6[l myexample.style.borderColor="fuchsia"
C7md,^%l'Nv nx }9Q.hbb?s0m
setInterval("flashit()", 1000)
"|Y7o~5E.~zl </script>
页: [1]
查看完整版本: 打字效果