Lesson 54: The Script and Its Effect



The Script

<SCRIPT LANGUAGE="javascript">

var i = 0
var typeString= "All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. "
+ " All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. "
+ " All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. "
+ " All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. "

function type()
{
var typeLength= typeString.length
document.typewriterScreen.typepage.value= document.typewriterScreen.typepage.value + typeString.charAt(i)
i++
setTimeout("type()",70)
}

</SCRIPT>

<Body onLoad= "type()">

<FORM NAME="typewriterScreen">
<TEXTAREA ROWS=6 COLS=45 WRAP="virtual" NAME="typepage"></TEXTAREA>
</FORM>

 

The Script's Effect

 

Back to the Index Page