I would like to add a random number generator to my site. The idea is to have a code that outputs a random number between a min and max value (i.e. 200-400) that updates in real time, without any page refresh. I came across this, but it doesn't really do I need to since the number is generated on click rather than dynamically (without any action on the user's part). Plus, if I set the range to 400 and min value to 230, the snippet outputs numbers that aren't even within this range (i.e. 580).
It would be even better to have the numbers display not so randomly (i.e. 340, then 348, then 367, then 330, 332, 330, 345, 357 etc). But it isn't mandatory.
Thank you for the help!
not so randomly- can you elaborate? Also, when and how often would the number be generated? You can usesetIntervalto execute the generator everyxmilliseconds