找了很多方法,发现就这个方法简单、直接、方便,直接推荐哦!
在汉字的位置加个保护措施:encodeURIComponent(parentid)
举个栗子>>>
$.ajax({
url: ‘url’+ encodeURIComponent(“中文参数值”),
type: ‘GET’,
dataType: ‘JSON’,
timeout: 5000,
error: function() { alert(‘error msg’); },
success: function(resp) {
console.log(resp);
}
});
转载于:https://www.cnblogs.com/gzh529/p/9871969.html
原文链接:https://blog.csdn.net/weixin_30342827/article/details/98842149
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。