$.ajax({
url:'/createQRcode',
type:'post',
dataType:"json",
success:function(data){
function myrefresh(){
$.ajax({
url:'/validateCode',
type:'get',
data:{qrCode:$("#val").val()},
dataType:"json",
success:function(data){
if(data.code=="success"){
window.location.href = "/index";
}else{
}
}
});
}
setInterval(function(){myrefresh()},2000);
}
});
我的location.href跳转会被setInterval给打断吗?