[英]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.