- 当字符串参数中包含非数字字符时,parseInt会返回NaN。
- 当字符串参数为undefined时,parseInt会返回NaN。
- 当字符串参数为null时,parseInt会返回NaN。
- 当字符串参数超出了JavaScript数值的范围时,parseInt会返回最接近的整数值。
- 当字符串参数以0开头时,parseInt会将其解析为八进制数值。
- 当字符串参数以0x开头时,parseInt会将其解析为十六进制数值。
- 当字符串参数为空格时,parseInt会返回NaN。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>