W3C home > Mailing lists > Public > public-html-ig-zh@w3.org > February 2011

Re: Math.random().toString(radix).substr(2) 的長度問題

From: Kang-Hao (Kenny) Lu <kennyluck@w3.org>
Date: Mon, 14 Feb 2011 06:11:09 +0900
Message-ID: <4D5848ED.30008@w3.org>
To: 中文HTML5同樂會ML <public-html-ig-zh@w3.org>
(11/02/12 3:13), John Hax wrote:
> [我剪]
>
> FF会限制长度,小数部分34位(根据r保留长度不同,可能是按照有效位数计算
> 的)。

的確有可能,我試 Math.random().toString(2).substr(2) 是52至53位。

URL: javascript:alert(Math.random().toString(2).substr(2))
Received on Sunday, 13 February 2011 21:10:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:43:46 UTC