Powered by Blogger.

Mencoba efek typing dengan javascript

ini tutorialnya di youtube

Lesson Code
 
<html> <head> <style type="text/css"> #myTypingText { background-color:#000; width:700px; height:120px; padding:12px; color:#FFF; font-family:Arial, Helvetica, sans-serif; font-size:16px; line-height:1.5em; } </style> </head> <body> <div id="myTypingText"></div> <script> var myString = "Place your string data here, and as much as you like."; var myArray = myString.split(""); var loopTimer; function frameLooper() { if(myArray.length > 0) { document.getElementById("myTypingText").innerHTML += myArray.shift(); } else { clearTimeout(loopTimer); return false; } loopTimer = setTimeout('frameLooper()',70); } frameLooper(); </script> </body> </html>

sumber : http://www.developphp.com/view.php?tid=1131

dan ini adalah contoh implementasi dari code tersebut

Bannerad

Artikel Terpopuler

Tags

Blogumulus by Roy Tanck and Amanda Fazani