Js precision overflow solution _ javascript tips-js tutorial

Source: Internet
Author: User
Generally, the parameter value cannot exceed 16 bits. If the value exceeds 16, the value is replaced by 0, so that we cannot find the desired result. This article describes how to handle this problem. Generally, the parameter value cannot exceed 16 bits. If 16 is exceeded, 0 is used instead, so that we cannot query the desired results.
When this problem occurs, we make the following changes:
Write attributes by yourself
Original:

The Code is as follows:


, <% = Dr. getString ("ID") %>) "> <% = dr. getString (" BT "). trim () +" "%>


The length of the XFORM_ID, MODULE_ID, and ID value exceeds 16.

After modification:

The Code is as follows:


"TagMid =" <% = dr. getString ("MODULE_ID") %> "tagIid =" <% = dr. getString ("ID") %> "onclick =" toProject (this) "> <% = dr. getString ("BT "). trim () + "" %>


The Code is as follows:


ToProject = function (e)
{
Location. href = "<% = path %>/form/" + e. tagFid + ". xform? ModuleId = "+ e. tagMid +" & Info_ID = "+ e. tagIid;
}


Handle garbled characters

The Code is as follows:


Window. open (encodeURI (url), '_ blank ');

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.