javascript - pop on page close? -


this question has answer here:

in effort reduce shopping cart abandonment, pop window offering 5% coupon code when user goes close shopping cart page.

i've seen these, , yes can annoying, can't seem locate code doing this.

there window event called onbeforeunload. can return string in event , echo string user , prevent window closing. can like:

window.onbeforeunload = function( ) {     return 'are sure want close window?'; } 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -