Javascript onclose event

非 Y 不嫁゛ 提交于 2019-12-11 11:43:42

问题


How can I run javascript when user close the browser. I tried to use 'onunload', but it calls every time I press F5/refresh button? Thanks


回答1:


As far as the Javascript on the page is concerned, there's no difference between closing the browser, navigating to another page or refreshing the same page.



来源:https://stackoverflow.com/questions/6494206/javascript-onclose-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!