vs2003 JS file Encoding Problem solving method _javascript Skills

Source: Internet
Author: User
Because the Assscript file contains the Chinese annotation or the Chinese alert ("Chinese information"), causes the reference JS file to be invalid or causes the pop-up information to be garbled. If you put the JS file method directly in the. aspx file, there is no problem. This problem is caused by the text encoding in. NET, and we need to save the Assscript.js file as a UTF-8 or other Unicode encoding, and the problem is solved. The original text is encoded as gb2312 because there are characters in it.

How do I encode the conversion?
1, with Notepad Open, save when the choice of Unicode encoding;
2, directly in VS choose Save As, Save the button to the right there is a small arrow, click, and then choose the encoding method to save on OK.

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.