js parseInt("08") does not specify carry system problem
When radix is not specified by default, when the 0x switch is switched, it is hexadecimal; if the 0 switch is switched and the second bit is not x, then it is octal (because the octal cannot have 8, 9, an error returns 0).
Therefore, when we use it, we should clearly specify the carry system to prevent errors.
If we usually use decimal bits, we will parseInt("08", 10);
Related Articles
js load reading content and display and hide div examples
This article mainly introduces how to load and read content and display and hide divs by js. Friends who need it can refer to it2014-02-02What does javascript:void(0) mean and the difference between href=# and href=javascriptvoid(0)
In Javascript, void is an operator. This operator specifies that an expression is to be calculated but does not return a value. This article introduces to you what javascript:void(0) means and the difference between href=# and href=javascriptvoid(0). Please refer to it if you need it.2015-11-11Analysis of the difference between JS data types (basic data types, reference data types) and heap and stack
This article mainly introduces the differences between JS data types (basic data types, reference data types) and heap and stack. It analyzes the JS basic data types, reference data types concepts, usage, and the differences between heap and stack in combination with examples. Friends who need it can refer to it.2020-03-03Knockoutjs Learning Series (II) Fancy Bundle
This article mainly introduces the relevant information of the Knockoutjs learning series (II) fancy bundling, and mainly introduces the use of various bindings in knockoutjs. It is very good and has reference value. Friends who need it can refer to it.2016-06-06Discuss the similarities and differences of three ways of declaring global variables in JavaScript
This article mainly introduces the similarities and differences of three ways to declare global variables in JavaScript. Variables and variable declarations are the most basic concepts of a language that beginners will quickly master. Friends who need it can come and refer to it, I hope it will be helpful to everyone2013-12-12Countdown to register 60s for WeChat applets using JS to realize the countdown to register 60s for WeChat applets
This article mainly introduces the 60s countdown function of WeChat applet registration, as well as the 60s countdown function of using JS to realize the 60s countdown function of registration, which has certain reference value. Interested friends can refer to it.2017-08-08bootstrap multiple styles of progress bar display
This article mainly shows everyone the various styles of bootstrap progress bars, default progress bars, striped progress bars, etc., which have certain reference value. Interested friends can refer to it.2016-12-12A brief discussion on the neat way of JavaScript code
This article mainly introduces a brief discussion on the neat way of JavaScript code. The editor thinks it is quite good. I will share it with you now and give you a reference. Let's take a look with the editor2018-10-10JS implements simple magnifying glass effect
This article mainly introduces in detail the effect of JS to implement a simple magnifying glass, which can be changed at will, and the size and proportion of the magnification area are introduced in detail. The sample code in the article is very detailed and has certain reference value. Interested friends can refer to it.2021-09-09Layui implements the method of moving the mouse to a cell to display data
Today, the editor will share with you a method of using Layui to move the mouse to a cell to display data. It has good reference value and hope it will be helpful to everyone. Let's take a look with the editor2019-09-09