J
j van c
why doesn't my code work? It' s just showing "W" on a document. It should be
"WELKOM" showing each letter with a delay of 1 second.
What is the meaning of "+j+" in de function call toon()?
<html>
<SCRIPT LANGUAGE = "JavaScript">
function doe()
{zin = "WELKOM";
lengte = zin.length;
j=1;
while (j<=lengte){
setTimeout("toon("+j+")", 1000);
j++ ;
}
}
function toon(z)
{
tekst= zin.substring(0,z);
document.write(tekst);
}
</SCRIPT>
<BODY onload="doe()">
</BODY>
</html>
"WELKOM" showing each letter with a delay of 1 second.
What is the meaning of "+j+" in de function call toon()?
<html>
<SCRIPT LANGUAGE = "JavaScript">
function doe()
{zin = "WELKOM";
lengte = zin.length;
j=1;
while (j<=lengte){
setTimeout("toon("+j+")", 1000);
j++ ;
}
}
function toon(z)
{
tekst= zin.substring(0,z);
document.write(tekst);
}
</SCRIPT>
<BODY onload="doe()">
</BODY>
</html>