转载地址:http://www.jb51.net/article/57783.htm
使用scriptCharset即可解决问题,用contentType就不一定可以了。@H_301_3@ @H_301_3@ 代码如下:@H_301_3@
$.ajax({ url: testUrl,dataType: 'jsonp',type: 'post',scriptCharset: 'utf-8' });@H_301_3@ 上面的解决方案是最完美的,另外也附上网上的解决方式吧,是用contentType来处理的 @H_301_3@ @H_301_3@ @H_301_3@ 代码如下: @H_301_3@
jQuery(form).ajaxSubmit({ url: "ajax.aspx?a=memberlogin",type: "post",dataType: "json",contentType: "application/x-www-form-urlencoded; charset=utf-8",success: showLoginResponse });虽然也可以用,但是不推荐给大家哈。