http://www.dynamicdrive.com/dynamicindex10/text5.htm
After downloading the script and saving it in your HTML page folder, try this out:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="TypingText.js">
/****************************************************
* Typing Text script- By Twey @ Dynamic Drive Forums
* Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
* This notice MUST stay intact for legal use
****************************************************/
</script>
</head>
<body>
<p id="example">This text has a <b>slashing cursor</b> at the end. <br />And this is on a new line, thanks to the <br> tag.</p>
<script type="text/javascript">
//Define typing example (use "slashing" cursor at the end):
var bob=new TypingText(document.getElementById("example"), 100, function(i){ var ar = new Array("\\", "|", "/", "-"); return " " + ar[i.length % ar.length]; });
bob.run();
bob.finishedCallback=function(){setTimeout("bob.run()",1000);};
</script>
</body>
</html>
Bookmarks