Why is jQuery unload not working in chrome and safari?

后端 未结 7 860
逝去的感伤
逝去的感伤 2020-12-05 17:42

unload function in jQuery works fine in Firefox but not in chrome and safari. please check this fiddle in chrome and Firefox. http://jsfiddle.net/jeevankk/Gywnw/2/ . Alerts

7条回答
  •  情深已故
    2020-12-05 18:40

    you can use onfocusout on the body .. but i wouldn't recommend if you are trying to use something like an alert, on this operation, asking the user not to leave your page ..

提交回复
热议问题