Troubleshoot a string constant that prompts for the end of a Web page when a JavaScript script is introduced

Source: Internet
Author: User

Maybe someone like me came across it. When debugging a Web page, the script that was introduced was completely correct, and the page still prompts for the problem of a string constant that is not closed.

This problem generally occurs because the JavaScript script file contains Chinese characters, so there are two general solutions:

1. Delete all the characters in the JS file

2. In the introduction of JS, to increase the set of character sets, as follows: < SCRIPT LANGUAGE = "JavaScript" charset = "gb2312" type = "Text/javascript" src = "/common.js" ></script >

And so on, and then refresh the page, the problem should be solved.

Note: Some people say that charset properties under the ie5/5.5 may not support, I do not have the environment, which in the use of the above method encountered a problem, you can tell me, thanks.

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.