Generating a random number in JavaScript - JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS
where 11 dictates that the random number will fall between 0-10. To increase the range to, say, 100, simply change 11 to 101 instead. Some of you may be curious as to why Math.floor(), instead of Math.round(), is used in the above code. While both ......