I have broblem.
Situation - user first time visited in site. User want close page (not go anover page, only close). Site have pop up comprising offer discounts.
I need show pop up befor user left site.
Use onbeforeunload method.
window.onbeforeunload = function(){
return 'Your message here.';
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.