$("#cx").on('click','button',function(){
//alert('asd');
$.ajax({
type:'post',
url:ApiUrl+'/index/logout',
data:{},
dataType:'json',
success:function(result){
if(result.status==1){
window.open(result.url,'_self')
// window.location.href=result.url;
}
}
});
return false;
});
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
不知道你的url带http://没有,带上http协议能跳转,不然就是追加在url尾部
使用
HTML5 history pushState/replaceState可以实现。ajax与HTML5 history pushState/replaceState实例
你可以去看看pjax
https://github.com/defunkt/jq...
是的,ajax或者getJson都可以实现局部内容刷新,而不用整个页面重新加载。