Javascript Jquery不仅在ie8中工作,所有其他浏览器都可以正常工作
在这里,我尝试使用Ajax加载一些数据。 在IE9和所有其他浏览器中工作正常。 但在IE8中,它总是被捕获。我不知道为什么它总是引发异常 这是我的密码Javascript Jquery不仅在ie8中工作,所有其他浏览器都可以正常工作,javascript,jquery,ajax,Javascript,Jquery,Ajax,在这里,我尝试使用Ajax加载一些数据。 在IE9和所有其他浏览器中工作正常。 但在IE8中,它总是被捕获。我不知道为什么它总是引发异常 这是我的密码 var SyncResponseText = ""; var WrapedRequestObject = JSON.stringify(RstClientServerDTO); try { SyncResponseText = eval($.ajax({ type: "POST", contentTy
var SyncResponseText = "";
var WrapedRequestObject = JSON.stringify(RstClientServerDTO);
try {
SyncResponseText = eval($.ajax({
type: "POST",
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
url: "../../ApplicationServiceHandler/ClientRequestHandler.ashx",
data: WrapedRequestObject,
timeout: 240000,
dataType: "json",
async: IsAssync,
success: function (msg) {
// if (msg == false) {
// window.location.href = window.location.href;
// }
// else {
SuccessCallBack(msg);
// }
}, // function (data) { alert('success') },
error: function (xhr, textstatus, error) { ErrorCallBack(xhr, textstatus, error) } // { alert('error') }
}).responseText);
}
catch (Exception) {
SyncResponseText = Exception.get_Message();
}
return SyncResponseText;
不要使用
eval
。你那部分代码毫无意义。你为什么要评估这整件事?这对我来说似乎很疯狂。+1我同意eval
没有意义。