JavaScript's Parseint, Parsefloat and other functions

xiaoxiao2021-03-06  67

JavaScript's Parseint, Parsefloat, etc. need to note, if we need to calculate the 10-encyclopedia, you must add a second parameter. This is because JavaScript believes that the value starting with 0 is expressed as an eight-input number. Sometimes we often ignore this.

There is currently this problem at the time of the verification date in validate.js.

Example: Parseint ("7") = 7 PARSEINT ("07") = 7 PARSEINT ("07", 10) = 7

PARSEINT ("8") = 8 PARSEINT ("08") = 0 PARSEINT ("08", 10) = 8

转载请注明原文地址:https://www.9cbs.com/read-119840.html

New Post(0)