POSUN TEXTU NA TLACITKU

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

076
p076.html / p076.zip
Efektny posun textu na tlacitku
1726b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<html> <head> <title> JavaScript DESTINATION - P076 </title> <script language="JavaScript"> <!-- var i = 0; var TextNumber = 0; var TextInput = new Object(); var HelpText=""; var Text = ""; var Speed=300; var WaitSpace=" "; TextInput[0] = "a uvidis !"; TextInput[1] = "Klikni sem"; TotalTextInput =1; for (var addWait = 0; addWait <= TotalTextInput; addWait++) { TextInput[addWait]+=WaitSpace; } var TimerId var TimerSet=false; function startBanner (form) { if (!TimerSet) { TimerSet=true; banner(); } } function banner() { Text=rollMessage(); TimerId = setTimeout("banner()", Speed); document.form2.banner.value=Text; } function rollMessage () { Wait_yn=false; i++; var CheckSpace = HelpText.substring(i-1, i); CheckSpace = "" + CheckSpace; if (CheckSpace == " ") {i++;} if (i >= HelpText.length+1) { i=0; if (TextNumber < TotalTextInput) {TextNumber++;} else {TextNumber = 0;} initBanner(); } Text = HelpText.substring(0, i); return (Text); } function initBanner() { Text = TextInput[TextNumber]; HelpText = Text; startBanner (); } function stopBanner() { TimerSet=false; clearTimeout (TimerId); } function resetBanner() { TimerSet=false; clearTimeout (TimerId); TextNumber=0; i=0; Speed=300; document.form2.banner.value=" "; initBanner(); } // --> </script> </head> <body onLoad="banner()" bgcolor="#FFFFFF"> <form name="form2" action="index.html"> <input type="submit" name="banner" VALUE="..Submit.."> </form> </body> </html>
[ Navrat / BACK ]