ajax 怎么重新加载页面


 

$.ajax({
  type:"post",  url:url,  data:{xxx:xx},  dataType: "json",  
  success : function(data){   window.location.href="跳转的url,后边也可以拼接点data中数据作为参数";  }});
如果是需要跳转到另外的页面,也可以用window.open(url);

 

 success: function (data) {
            layer.msg(data["message"]);
            if (data["result"] == "success") {
                setTimeout(function () {
                    window.parent.location.reload();//让打开这个窗口的父窗口刷新,然后本子窗口关闭!
                }, 1000);
            }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM