|
作者: zjh1983 [zjh1983] 论坛用户 | 登录 |
1.以下代码放在HTML的<body></body>之间[适当的位置]: <script language=javascript> var layers =document.layers,style=document.all,both=layers||style,idme=908601; if(layers){layerRef='document.layers';styleRef ='';}if(style){layerRef='document.all';styleRef = '.style';} function writeOnText(obj,str){ if(layers)with(document[obj]){ document.open();document.write(str);document.close();} if(style)eval(obj+'.innerHTML=str'); } var dispStr=new Array("蝴蝶谷欢迎您的到来!"); var overMe=0; function txtTyper(str,idx,idObj,spObj,clr1,clr2,delay,plysnd){ var tmp0=tmp1= '',skip=100; if (both && idx<=str.length) { if (str.charAt(idx)=='<'){ while(str.charAt(idx)!='>') idx++;idx++;} if (str.charAt(idx)=='&'&&str.charAt(idx+1)!=' '){ while (str.charAt(idx)!= ';')idx++;idx++;} tmp0 = str.slice(0,idx); tmp1 = str.charAt(idx++); if (overMe==0 && plysnd==1){ if (navigator.plugins[0]){ if(navigator.plugins["LiveAudio"][0].type=="audio/basic" && navigator.javaEnabled()){document.embeds [0].stop(); setTimeout("document.embeds[0].play(false)",100);} } else if (document.all){ ding.Stop(); setTimeout("ding.Run()",100);} overMe=1;}else overMe=0; writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2 +"'>"+tmp1+"</font></span>"); setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);}} function init(){txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#ff0000', '#008080', 1000, 0);} </script> <BODY onload=init()> <DIV class=ttl1 id=ttl0></DIV> |
地主 发表时间: 05/05 16:04 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号