I have a text box, which changes the content on page reload, but I was wondering how to do it Is the specified amount of time possible without flashing it?
Copy and paste this code into an html file and check it, fits your needs for you. To make editing should be easy enough: o)
& lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; // You want to change these messages anytime in text message / you can add or remove any new posts by looking at the required transmitted messages ("Hello", "there", "there", "mine", "name "," Is "," chief 17! "); Var i = 0; Function change text () {document.getElementById ("TB"). Value = messages [i]; If (i & lt; messages.length -1) {i ++; } And {i = 0; }} & Lt; / Script & gt; & Lt; / Head & gt; & Lt ;! - How long do you want to wait between messages changes (1000 1 second) - 1000 - & gt; & Lt; Body onLoad = "setInterval ('changeText ()', 1000)" & gt; & Lt; Input type = "text" id = "tb" /> & Lt; / Body & gt; & Lt; / Html & gt;
Comments
Post a Comment