Korak 1: Убаците код испод у Head твојој у страници
<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>
Корак 2: Затим, једноставно додате испод узорак ХТМЛ на своју страну, што показује како створити Куцање текст из двије произвољне садржаја на страници
<div id="example1">Thanks for visiting <a href="http://www.dynamicdrive.com/">Dynamic Drive!</a>
Wow, HTML gets properly typed out too!</div>
<p id="example2">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 first typing example:
new TypingText(document.getElementById("example1"));
//Define second typing example (use "slashing" cursor at the end):
new TypingText(document.getElementById("example2"), 100, function(i){ var ar = new Array("\\", "|", "/", "-"); return " " + ar[i.length % ar.length]; });
//Type out examples:
TypingText.runAll();
</script>