Home > Web Front-end > JS Tutorial > JavaScript's parseInt base problem_javascript skills

JavaScript's parseInt base problem_javascript skills

WBOY
Release: 2016-05-16 18:53:15
Original
948 people have browsed it

After looking through the JS programming manual, it turns out that parseInt will automatically convert the passed parameter value into the corresponding eight, ten, and hexadecimal value. In this case, the base can be set to distinguish special situations.

Copy code The code is as follows:

parseInt(09,2) | parseInt( 09,10) | parseInt(09,8) | parseInt(09,16)

In fact, problems like these can be completely avoided. The key is to be patient.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template