【发布时间】:2023-03-04 10:24:01
【问题描述】:
可能重复:
Workarounds for JavaScript parseInt octal bug
How to parseInt a string with leading 0
document.write(parseInt("07"));
产生“7”
document.write(parseInt("08"));
产生“0”
这给我带来了问题(对不起,我必须或者我不能提交问题)。任何人都知道为什么它很愚蠢或者是否有更好的功能?
【问题讨论】:
标签: javascript