`

JavaScript The random() and other Methods of the Math object

阅读更多

 

The random() Method

    The  Math.random()  method returns a random number between the 0 and the 1, not including either 0 or 1. This is a favorite tool of web sites that are trying to display random quotes or random facts upon entry of a web site. You can use  Math.random()  to select numbers within a certain integer range by using the following formula:

 


 


 

 

 



 

 

 

  • 大小: 62.6 KB
  • 大小: 140.6 KB
  • 大小: 79.7 KB
  • 大小: 36.2 KB
  • 大小: 8.7 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics