Advertisement
krot

window.onbeforeunload задержать пользователя на сайте

Dec 21st, 2016
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.20 KB | None | 0 0
  1. var show=true;function showWindow(){
  2. if(show)return "Оставайтесь на нашем сайте";}
  3. $('a,input[type="submit"]').click(function(){show = false;});
  4. window.onbeforeunload=showWindow;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement