ITeye博客

JavaScript:random method

ilusm · 2008-08-25 10:31 · JavaScript · Markdown

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())

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。