Garbled web page problems when using Jquery

Source: Internet
Author: User

Many times, some Jquery plug-ins on the Internet have garbled Characters During page running. I have summarized three points and hope to help you:


1. When you import Jquery code: other text on the webpage is normal, while Jquery code displays an exception.
Solution: Open the jquerycode with notepad (.txt) or word, save it as, and change its encoding method (usually changed to UTF-8 or gb2312 ).

2. When you want to modify the encoding of the entire website in ASP. NET.
Modify the encoding in the <globalization requestEncoding = "gb2312" responseEncoding = "gb2312" culture = "zh-CN" fileEncoding = "gb2312"/> label in the web. config file.
3. When the html webpage code is garbled.
Modify the charset UTF-8 <meta http-equiv = "Content-Type" content = "text/html; charset = gbk"/>.
Note: Commonly Used encoding types in webpages: UTF-8, gb2312, and gbk.

 

From csxj817

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.