POSUVANIE TEXTU V RIADKU

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

 

110
p110.html / p110.zip
Posuvanie textu vo formularovom riadku
1475b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<HTML> <HEAD> <title> JavaScript DESTINATION - P110 </title> <SCRIPT Language="JavaScript"> <!-- var i = 0; var TextNumber = 0; var TextInput = new Object(); var HelpText = ""; var Text = ""; var Speed = 90 var WaitSpace = " " TextInput[0] = " " TextInput[1] = " JavaScript D. Vas vita na svojich strankach" TextInput[2] = " a praje Vam mnoho uspechov pri tvorbe WWW stranok" TextInput[3] = " s vyuzitim skriptoveho jazyka JavaScript. " TotalTextInput = 3; for(var j = 0; j < TotalTextInput; j++) { TextInput[j] += WaitSpace } var TimerId var TimerSet = false; function startBanner() { TimerSet = !TimerSet if(TimerSet) banner(); else kill(); } function banner() { Text = rollMessage(); TimerId = setTimeout("banner()", Speed) document.Roll.TextArea.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; } init(); } Text = HelpText.substring(0, i); return (Text); } function init() { Text = TextInput[TextNumber] HelpText = Text; } function kill() { clearTimeout(TimerId) } // --> </SCRIPT> </HEAD> <BODY onLoad="init(); startBanner();"> <CENTER> <FORM NAME="Roll"> <INPUT TYPE="text" NAME="TextArea" WRAP=VIRTUAL SIZE=47> </FORM> </BODY> </HTML>
[ Navrat / BACK ]