Home  >  Article  >  php教程  >  Javascript 内置对象 Math

Javascript 内置对象 Math

WBOY
WBOYOriginal
2016-06-06 20:01:391091browse

Javascript 内置对象 Math head title用Math.random()得出0-1之间随机数的Javascript示例/title /head body script type="text/javascript" document.write(Math.random()) /script p该Javascript示例解释:这个示例用到了Math.random(),这个函数返回值是一

Javascript 内置对象 Math



用Math.random()得出0-1之间随机数的Javascript示例


该Javascript示例解释:这个示例用到了Math.random(),这个函数返回值是一个大于等于0,且小于1的随机数。你可以测试一下,多点几次上面的蓝色按钮,会发现,每次出来的数字,都是随机的,不同的。


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn