【发布时间】:2014-06-03 19:13:11
【问题描述】:
我有一个 ajax 调用
$.ajax({
url: 'url¶1=' + JSON.stringify(obj),
type: 'POST',
async: true,
contentType: 'application/json',
data: {},
success: function(data){
},
error: function(error){
}
});
在网址中,每个" 都会得到%22
如何才能逃脱?
【问题讨论】:
-
您在 URL 查询字符串中发送
json数据并在type: "POST"中发送data:{},哦,天哪,我认为除了转义"之外,还有更多优化选项。尝试不同的方法,使用data发布POST数据。那将是最好的解决方案。
标签: javascript jquery ajax