use*_*756 5 javascript ajax jquery json
我一直在尝试使用这个跨浏览器发布语句,我收到以下错误:
$.ajax({
type: 'POST',
url: "http://ourdevtest.com/foo/foo",
contentType: "application/x-www-form-urlencoded; charset=utf-8",
data: form.serialize(),
success:function(result, textStatus, xhr) {
form.hide();
console.log('success in preview form');
console.log("result: " + JSON.stringify(result));
console.log("textStatus: " + textStatus);
console.log("xhr: " + JSON.stringify(xhr));
app.showThankYou();
},
dataType: 'json'
});
});
},
Run Code Online (Sandbox Code Playgroud)
它无法加载此URL,但我不知道如何阻止它添加奇怪的字符.
如果您解码该错误响应,则会得到以下字符串:http://\xe2\x80\x8b/\xe2\x80\x8b/\xe2\x80\x8buser:\xe2\x80\x8bpassword@ourdevtest.com/\xe2 \x80\x8bfoo/\xe2\x80\x8b1/\xe2\x80\x8bfoo/ \xe2\x80\x8b
\n\n我认为您应该尝试直接使用某些字段值,而不是使用 form.serialize(),仅用于测试目的。
\n| 归档时间: |
|
| 查看次数: |
1202 次 |
| 最近记录: |