Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var text="Ini teks berjalan";
- var delay=60;
- var currentChar=1;
- var destination="[none]";
- function type()
- {
- {
- var dest=document.getElementById("destination");
- if (dest)
- {
- dest.innerHTML=text.substr(0, currentChar)+"<blink>_</blink>";
- currentChar++;
- if (currentChar>text.length)
- {
- currentChar=1;
- setTimeout("type()", 5000);
- }
- else
- {
- setTimeout("type()", delay);
- }
- }
- }
- }
- function startTyping(textParam, delayParam, destinationParam)
- {
- text=textParam;
- delay=delayParam;
- currentChar=1;
- destination=destinationParam;
- type();
- }
- startTyping(text, 50, "textDestination");
- </script>
- <div id="destination"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement