This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14418|Reply: 0

[JavaScript] js number is passed into the method, and the value is added by one or minus one

[Copy link]
Posted on 6/28/2016 2:16:52 PM | | | |



Cause, I use the 20160628114212391 as a parameter, pass it into the method, and then it pops up immediately and displays the 20160628114212390


Damn, how can I lose one?????


Then, I passed the 20160628114212395 in again and immediately popped 20160628114212396


Damn, how can I add one????


Then, I tried it, other values, some are normal, some are not normal, I don't know what's wrong, online, I didn't find a solution,


Suddenly, I thought, is the number too big, and then I looked for it:


The Javascrip{filter}t number format allows you to exactly represent all integers between
−9007199254740992 and 9007199254740992 (i.e. plus or minus 2 to the power of 53)

Perhaps, this is the reason, if the maximum value is exceeded, then the algorithm will be messed up.




Previous:There are two ways to solve the problem that dynamically added element nodes in jquery cannot trigger events
Next:asp.net MVC uses WebUploader to upload files
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com