RE: Need simple delay loop
by "Brian Paulson" <webmaster(at)chieftain.com>
|
Date: |
Fri, 16 Aug 2002 16:25:16 -0600 |
To: |
<john(at)woram.com>, <hwg-techniques(at)hwg.org> |
In-Reply-To: |
woram |
|
todo: View
Thread,
Original
|
|
Maybe you could do another loop in side that one.
for (var k=0; k<10; k++)
{
for (var a=0; a<10; a++)
{
document.write(a);
}
}
Then just work on how man loops it takes to get the timing right.
Not sure if this will work or not.
Hth
Thank You
Brian Paulson
Sr. Web Developer
bpaulson(at)chieftain.com
http://www.chieftain.com
-----Original Message-----
From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
On Behalf Of John Woram
Sent: Friday, August 16, 2002 9:45 AM
To: hwg-techniques(at)hwg.org
Subject: Need simple delay loop
This function displays the numbers 0-9, but it does it instantly, as
if I'd written "0123456789" as one word:
for (var k=0; k<10; k++) document.write(k);
What I want is to display the "0" and then pause before displaying the
"1" and so on. So with a 1-second pause after each increment of k, it
would take 10 seconds to complete the loop. Any suggestions on how to
do this? It should be simple (I think).
Thanks,
John Woram
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA