I want to send JSON data in XDR using the POST method. I'm able to send JSON data, however the problem is .
(DOT) symbols are converted into _
(underscores). Here is the code:
我想使用POST方法在XDR中发送JSON数据。我能够发送JSON数据,但问题是。 (DOT)符号转换为_(下划线)。这是代码:
if ($.browser.msie && window.XDomainRequest) {
var xdr = new XDomainRequest();
xdr.open("POST",Path);
xdr.send(JSON.stringify(data) + '&ie=1');
xdr.onerror = function() {
alert('in error');
};
xdr.onload = function() {
alert(xdr.responseText);
}
} else {
jQuery.ajax({
type: "POST",
url: Path,
data: JSON.stringify(data),
dataType: 'json',
contentType: 'application/json',
success: function(msg) {
alert(msg);
}
});
}
1 个解决方案
#1
0
May be your server side scripting is wrong.. this code seems to be correct....
可能是你的服务器端脚本错误..这段代码似乎是正确的....
#1
0
May be your server side scripting is wrong.. this code seems to be correct....
可能是你的服务器端脚本错误..这段代码似乎是正确的....