ajax Post之后的页面跳转问题
新手,用ajax执行post之后原来的页面跳转失效,跟代码下来之后发现页面跳转的在ajax post之前就已执行,求指导
5 回复
代码如下:
function deleteById(id){
var flag = confirm('confirm delete this record?');
if(flag){
$.ajax({
data: {accountId:id},
url: '/deleteAccount',
dataType: 'json',
type:'post',
success:function(){
alert(11111111)
window.location = '/managerMoney'
}
});
}
```
}