Link to home
Start Free TrialLog in
Avatar of plasticbrain
plasticbrain

asked on

Random number in Javascript every X seconds

How can I use javascript to generate a random number between X and Y every Z seconds?

I am wanting to make a sort of fake page counter so once the page loads, I am wanting it to say something like "Number of people currently viewing: XXXX"  where XXXX changes every second or so.

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of mr_egyptian
mr_egyptian
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of plasticbrain
plasticbrain

ASKER

This is exactly what I was looking for! Thank you for the excellent code snippet.