random method
Returns a pseudo-random number between zero and one. This method is available on Unix platforms only.
语法
Math.random()
Method of
Math
例子
//Displays a random number between 0 and 1 document.write("The random number is " + Math.random())