在ios里面返回上一级报错问题

$("#backPrev").attr("href","javascript:void(0);").click(function(){

    if (/(iPhone|iPad|iPod)/i.test(navigator.userAgent)) {            
            window.location.href = window.document.referrer;
    } else { window.history.go("-1"); }
});
参考博文:http://www.cnblogs.com/qingliuyu/archive/2012/05/03/2481305.html
posted @ 2019-05-20 13:47  指尖流年1218  阅读(199)  评论(0编辑  收藏  举报