Javascript script collection, garbled

Source: Internet
Author: User

Source code enthusiast layer and Layout

Effect:
The drag prompt layer (mode window) is displayed)

[Original] solve Chinese garbled JavaScript code

Http://www.cnblogs.com/xjyggd/archive/2009/04/14/1436000.html

[ Original] solve JS Chinese garbled characters
Method 1: < Script SRC = " ../JS/common. js " Type = " Text/JavaScript " Charset = " Gb2312 " > </ Script > Add charset = " Gb2312 " You can.
Method 2: Change the JS file encoding to UTF. - 8 (Default vs2005 code)
Method 3: Change the Asp.net page output code to gb2312 (page / Web. config can be set)

Content Encoding format of cookies
The value of cookies can contain punctuation marks other. However, Chinese characters cannot be saved. Garbled characters appear when saving Chinese characters.
Therefore, cookies must be encoded and decoded in a unified manner. To enable decoding and encoding on both the browser and server, the UTF Encoding format must be used in a unified manner.
This is mainly because only UTF Encoding formats can be used in JavaScript.

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.