解決方案:
在ajax傳遞前用若是Array,JSON,等其它對象,可用JSON.stringfy字符串序列化后,賦值給ajax傳遞,在后臺獲取后,對于未使用JSON.stringfy序列化的情況下,直接轉碼:將utf-8轉成gbk編碼的,再處理。
在后臺進行轉碼。
mb_convert_encoding($brand_name, "GBK", "utf-8");
另一種解決方法
jQuery(form).ajaxSubmit({?
url: "ajax.jsp?a=memberlogin",?
type: "post",?
dataType: "json",?
contentType: "application/x-www-form-urlencoded; charset=utf-8",?
success: showLoginResponse?
});
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!