Senin, 17 Mei 2010

50 - tari Teks status bar 3


<!-- this script got from www.javascriptfreecode.com-Coded by: Krishna Eydat -->

<!-- Start of Typing Text Script -->
<!-- This types one letter at a time in the Status bar -->
<!-- Instructions: Just put this script anywhere on your webpage
and you will have the typewriter effect on your messages
displayed in the status bar.

To change the speed of your banner increase or decrease the
value for 'var speed'.
(Note: decreasing this value increases the speed of your banner.)

To change the pause between each message change the value
for 'var pause'.
(Note: increase value to increase pause.)
-->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<SCRIPT LANGUAGE="JavaScript">

var speed = 100
var pause = 1000
var timerID = null
var texttype = false
var ar = new Array()

ar[0] = "This is the Typing Text Javascript"
ar[1] = "CoffeeCup Software is cool!"
ar[2] = "El HTML Editor++ es muy bueno!"

var msgnow = 0
var offset = 0

function stopBanner() {
if (texttype)
clearTimeout(timerID)
texttype = false
}

function startBanner() {
stopBanner()
showBanner()
}

function showBanner() {
var text = ar[msgnow]

if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++

var partialMessage = text.substring(0, offset + 1)
window.status = partialMessage
offset++
timerID = setTimeout("showBanner()", speed)
texttype = true
} else {
offset = 0
msgnow++
if (msgnow == ar.length)
msgnow = 0

timerID = setTimeout("showBanner()", pause)
texttype = true
}
}

</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<font face="Tahoma"><a target="_blank" href="http://www.javascriptfreecode.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>

Tidak ada komentar:

Posting Komentar