(a)因为必须提供no-toFixed案例的代码(因为toFixed是 本身不够广泛)并且因为很可能结果 会显示出来,所以计算速度并不重要,是不是真的好b / b 值得一共来打扰? (b )toFixed可靠地说有bug,但我不知道是否有任何 适用于toFixed(2) - < URL:http:// www .merlyn.demon.co.uk / js-round.htm#toF> (c)对于非常大的数字,编码转换将失败,其中 toString使用电子格式;如果数字可能非常大,那么k可以是 如果它包含一个e(更好地给出正确的数字,而不是给出错误的格式,而不是给出错误的 - 或者非数字,恕我直言。 - ?约翰斯托克顿,英国萨里。 [email protected] Turnpike v4.00 IE 4? < URL:http://www.jibbering.com/faq/> JL / RC:新闻常见问题:comp.lang.javascript < URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr数学,日期,来源。 < URL:http://www.merlyn.demon.co.uk/> TP / BP / Delphi / jscr /& c,常见问题项目,链接。 (a) as code for the no-toFixed case must be provided (because toFixed isnot widely enough native) and as it is very probable that the resultwill be displayed and so calculation speed is not vital, is it reallyworth bothering with toFixed at all? (b) toFixed is reliably said to have bugs, but I don''t know whether anyapply to toFixed(2) -<URL:http://www.merlyn.demon.co.uk/js-round.htm#toF> (c) the coded conversion will fail for very large numbers, wheretoString uses e-format; if numbers may be very large, then k could bereturned as result if it contains an e (better to give right number inwrong format than to give wrong- or non- number, IMHO). --? John Stockton, Surrey, UK. [email protected] Turnpike v4.00 IE 4 ?<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links. 这篇关于toFixed实现帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-12 04:14