Possible Duplicate:
Generating random numbers in Javascript
How do I get a random number between −10 and 10 in JavaScript?
var min = -10; var max = 10; // and the formula is: var random = Math.floor(Math.random() * (max - min + 1)) + min;
jQuery: $.randomBetween(minValue, maxValue);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With