扫码关注官方订阅号
就是一个页面分享出去,上面有返回按钮,如果是分享页面的这个人,点击返回就是正常上一页,别人点开他分享的这个页,点击返回不是没有上一页吗,我们希望它跳到别的url,应该怎么处理?
学习是最好的投资!
document.referrer
if(history.length==0){ }
goBack: function(){ document.referrer === '' ? window.location.href = 'http://m2.paipai.com/index.shtml' : window.history.go(-1); }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
document.referrer
if(history.length==0){
}