Violent sweat, a question about JavaScript parseint ()

Source: Internet
Author: User
During the last few days of system creation, I suddenly found that the time selected from the Time Selection box always reported an incorrect format. I found through debug that an error was reported when I used parseint, the strange thing is that this method converts... 07 is okay, but 08,09 is converted to 0. Search on www.yahoo.cn and get the following article from dear friend, then the fog is blurred. In the past, parseint () had two parameters, and the 2nd parameter pointed out the hexadecimal format to be converted, if the first 1st parameters start with 0 but do not specify the hexadecimal number of the 2nd parameters, the function is converted to an octal value by default, so it is converted from to 0.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.