sunlanda
7/28/2016 - 9:13 AM

页面刷新的几种方法/新增页面回退

页面刷新的几种方法/新增页面回退

history.go(0);
history.back(-1);
window.location.replace(); //抹除历史路径
window.location.href = window.location.href;  //仍然可以回退

//方法
goBackPage: function () {
            switch (_file_name) {
                case "c_interact_info":
                    return "c_interact";
                case "c_policy_info":
                    return "c_policy";
            }
        },
//事件
backEvt:function(){
            $(window.parent.document).find("#mainFrame").attr("src",fun.goBackPage() + ".html")
            top.location.hash =fun.goBackPage();
        },
//调用
        $(".main-title").on("click","a",evt.backEvt);