回发后,$ .getJSON()在ie10及以上版本中无法正常工作。 [英] $.getJSON() is not working in ie10 and above after postback.

查看:77
本文介绍了回发后,$ .getJSON()在ie10及以上版本中无法正常工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$。getJSON('VSAsyncMethod.aspx?ReqType = UPDATEPRODUCTCOMPARESESSION& CheckBoxValue ='+ encodeURIComponent(chkValue)+'& CheckBoxStatus ='+ chkStatus +'& random ='+ Math.random(),
函数(响应){

if(response!= null){

$ .each(response,function(){

$(" #ctl00_hdnCompareProductCount")[0] .value = this ['PRODUCTCOUNT'];

ShowCompareLink();

if(this ['MESSAGE' ]!="")

{

alert(此['MESSAGE']);

Control.checked = false;

Control.parentElement.parentElement.getElementsByTagName('span')[0] .innerHTML ="加入比较"

}

else

{

返回true;

}

});

}

})



我已经编写了上面的代码它在第一次加载页面时工作正常但在回发之后它不起作用这只发生在其他浏览器上的Internet Explorer 10和11中正常工作。



请给我正确的解决方案。

$.getJSON('VSAsyncMethod.aspx?ReqType=UPDATEPRODUCTCOMPARESESSION&CheckBoxValue='+ encodeURIComponent(chkValue) +'&CheckBoxStatus='+ chkStatus + '&random=' + Math.random(),
function(response){
if(response!=null){
$.each(response,function() {
$("#ctl00_hdnCompareProductCount")[0].value=this['PRODUCTCOUNT'];
ShowCompareLink();
if(this['MESSAGE']!="")
{
alert(this['MESSAGE']);
Control.checked= false;
Control.parentElement.parentElement.getElementsByTagName('span')[0].innerHTML="Add to compare"
}
else
{
return true;
}
});
}
})

I have write above code it's working fine when page is load first time but after postback the it's not working this happens only in Internet Explorer 10 and 11 on other browser works properly.

Please give me proper solution.

推荐答案

.each(response,function(){
.each(response,function() {


(" #ctl00_hdnCompareProductCount")[0] .value = this ['PRODUCTCOUNT'];

ShowCompareLink();

if(this ['MESSAGE']!="")

{

alert(this ['MESSAGE']);

Control.checked = false;

Control.parentElement.parentElement.getEleme ntsByTagName('span')[0] .innerHTML ="加入比较"

}

其他

{

返回true;

}

});

}

})



我已经编写了上面的代码,当页面第一次加载时工作正常但是在回发之后它不起作用这只发生在其他浏览器上的Internet Explorer 10和11中正常工作。



请给我正确的解决方案。
("#ctl00_hdnCompareProductCount")[0].value=this['PRODUCTCOUNT'];
ShowCompareLink();
if(this['MESSAGE']!="")
{
alert(this['MESSAGE']);
Control.checked= false;
Control.parentElement.parentElement.getElementsByTagName('span')[0].innerHTML="Add to compare"
}
else
{
return true;
}
});
}
})

I have write above code it's working fine when page is load first time but after postback the it's not working this happens only in Internet Explorer 10 and 11 on other browser works properly.

Please give me proper solution.


这篇关于回发后,$ .getJSON()在ie10及以上版本中无法正常工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆