gpt4 book ai didi

javascript - JavaScript "parseInt()"的问题

转载 作者:数据小太阳 更新时间:2023-10-29 04:23:37 24 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Workarounds for JavaScript parseInt octal bug
How to parseInt a string with leading 0

document.write(parseInt("07"));

产生“7”

document.write(parseInt("08"));

产生“0”

这给我带来了问题(很抱歉我胡说八道,我必须提交问题,否则我不能提交问题)。任何人都知道为什么它是愚蠢的或者是否有更好的功能?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com