[英]Beforeunload is not working to redirect user to another page, how can I redirect user to another page/url when he attempts to close a window/tab?
[英]How to Redirect User to Another URL Depending on the URL He Came From
Can a javascript code that runs when a page loads or equivalent solution detect which pior URL the user came from, and if the user came from a certain url then the javascript would forward the user to another defined url?
如果要获取上一页的url: document.referrer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.