You are here: irt.org | FAQ | DHTML | Q1177 [ previous next ]
Try:
<script language="JavaScript"><!-- function changeContent(what,text) { if (document.all) document.all[what].innerHTML = text; else if (document.layers) { document.layers[what].document.open(); document.layers[what].document.write(text); document.layers[what].document.close(); } } var text = "Hello world"; var i = 0; function start() { changeContent('what',text.substring(0,++i)) if (i<text.length) setTimeout('start()',500); } //--></script> <body onLoad="start()"> <p> <div id="what" style="position:absolute;"></div> </p>