Write a code to create a scrolling text in a text box

Write a code to create a scrolling text in a text box

Code

<html>
<script>
var sp;
var k;
k=0;
sp=" ";
function scroll()

{
f1.t1.value=sp+"welcome";
sp=sp+" ";
k=k+1;

if(k>=30)
{
sp=" "
k=0;
}

window.setTimeout("scroll()",100);
}
</script>
<body onload="scroll()">
<form id="f1" method="post">
<input type="text" size="50" id="t1">
</form>
</body>
</html>

output

Comments

Popular posts from this blog

MODEL QUESTIONS FOR IPO & PM GRADE 1 EXAM

Postal employee corner Android App V1.0

Applet Not initialized properly’ Error in Finacle – Solution