第一种:打印多个文字
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("是一个专业的收集各类脚本学习资料的网站,尽量修正错误打造精品脚本类学习网站,我们为大家游戏脚本资源,源码,软件,asp,php,javascript等编程资料,是网页制作,网络编程,网站建设人士的聚集场所。");
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)=='') 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, ""+tmp0+""+tmp1+"");
settimeout("txttyper('"+str+"', "+idx+", '"+idobj+"', '"+spobj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);}}
function init(){txttyper(dispstr[0], 0, 'ttl0', 'ttl1', 'red', '#99ff33', 300, 0);}
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
第二种:在textarea中显示的效果
<!--
var max=0;
function keeptext()
{
max=keeptext.arguments.length;
for(var i=0;i
打字效果
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]