Home > Web Front-end > JS Tutorial > body text

Solution to jquery Chinese garbled characters

藏色散人
Release: 2021-02-03 17:40:22
Original
1901 people have browsed it

The jquery Chinese garbled code is because the contentType does not specify the encoding. The solution: first search for "contentType" in jQuery.js; then add the code after x-www-form-urlencoded as "charset=UTF- 8” is enough.

Solution to jquery Chinese garbled characters

The operating environment of this tutorial: Windows 7 system, jquery version 1.10.0, Dell G3 computer.

jQuery perfect solution for Chinese garbled characters

Recently encountered the problem of Chinese garbled characters using jQuery. In fact, his Chinese garbled characters are because the contentType does not specify the encoding. , just search for

'contentType'

in jQuery.js and then add

; charset=UTF-8 after application/x-www-form-urlencoded

eventually became

contentType:"application/x-www-form-urlencoded; charset=UTF-8"
Copy after login

The problem is solved, I think the funniest thing is that so many people on the Internet are transcoding again in their own code, and they also wrote Very detailed analysis, how to transfer, so funny.

Recommended: "jquery video tutorial"

The above is the detailed content of Solution to jquery Chinese garbled characters. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template