Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <script type="text/javascript">
  2. var text="Ini teks berjalan";
  3. var delay=60;
  4. var currentChar=1;
  5. var destination="[none]";
  6. function type()
  7. {
  8. {
  9. var dest=document.getElementById("destination");
  10. if (dest)
  11. {
  12. dest.innerHTML=text.substr(0, currentChar)+"<blink>_</blink>";
  13. currentChar++;
  14. if (currentChar>text.length)
  15. {
  16. currentChar=1;
  17. setTimeout("type()", 5000);
  18. }
  19. else
  20. {
  21. setTimeout("type()", delay);
  22. }
  23. }
  24. }
  25. }
  26. function startTyping(textParam, delayParam, destinationParam)
  27. {
  28. text=textParam;
  29. delay=delayParam;
  30. currentChar=1;
  31. destination=destinationParam;
  32. type();
  33. }
  34. startTyping(text, 50, "textDestination");
  35. </script>
  36. <div id="destination"></div>