ajax is the simplest and perfect solution to the problem of garbled data
Use scriptCharset to solve the problem, but not necessarily contentType.
$.ajax({
url: testUrl,
dataType: 'jsonp',
type: 'post',
scriptCharset: 'utf-8'
});
The above solution is the most perfect, and there is also an online solution, which is handled with contentType
jQuery(form).ajaxSubmit({
url: "ajax.aspx? a=memberlogin",
type: "post",
dataType: "json",
contentType: "application/x-www-form-urlencoded; charset=utf-8",
success: showLoginResponse
});
Although it can be used, it is not recommended for everyone.
- ajax request garble solution (Chinese garble)
- The solution to the Chinese garbled code problem of ajax get request in jsp
- How to solve garbled characters in Chinese when JQuery ajax returns json
- JQuery Ajax Post method to pass Chinese garbled characters solution
- How to solve the problem of passing Chinese garbled characters in the url of jquery.ajax
- Solve ajax+php Chinese garbled code method detailed explanation
- The solution to the problem of transmitting Chinese garbled characters in Ajax request
Related article
-
ajax three level linkage implementation method
This article mainly introduces the implementation method of ajax three-level linkage in detail for everyone, and has certain reference value, interested partners can refer to it2017-03-03 -
The loading wait effect before Ajax returns the data
We pass parameters to the background through ajax request, and then the background returns data to the front desk after a series of operations. I hope that a loading.gif image can be displayed before waiting for the successful return of data. Next, through this article to share the loading waiting effect before Ajax returned data, the need of friends can refer to it2017-08-08 -
If your website has file upload capabilities, you can use the five Ajax file upload controls introduced in this article to improve the user experience. You know, uploading files is always a painful process, and it's not realistic to eliminate it, but at least if you make an effort to reduce the pain for users, then users will love your site.2009-10-10
-
Explore some minor issues in Ajax
In the process of using ajax often encounter a variety of problems, today Xiaobian to share some small problems in ajax, more practical, interested friends can refer to2016-05-05 -
Ajax long connection project case
The so-called long connection, is to continue to send requests, the request is blocked in the server side, each time more than the request time to re-send the request, the following is an example for everyone to introduce in detail, interested friends do not miss it2013-08-08 -
How do I use ajax to read data in Json
This article mainly introduces how to use ajax to read the data in Json, how to use AJAX to read the data in Json array, interested partners can refer to it2016-04-04 -
How to solve the problem of garbled characters in remote page crawling
How to solve the problem of garbled characters in remote page crawling...2006-12-12 -
ajax passes a parameter to the concrete implementation
ajax to pass a parameter or more parameters in the process of use due to special needs often used, the following to share with you the specific implementation method, interested friends can refer to the next ha2013-05-05 -
This article mainly introduces the basic use of Ajax detailed explanation, is the ability of front and back end interaction, that is, our client to send messages to the server tool, and accept the response tool, this article to explain the basis of ajax in detail, the need of friends can refer to2023-05-05
Latest comments