JavaScript + onbeforeunload

后端 未结 6 1285
盖世英雄少女心
盖世英雄少女心 2020-11-30 09:30

I have a query regarding my application. Whenever user closes browser window accidentally I\'d want to do some clean up operations before that. I have used onunload event bu

6条回答
  •  Happy的楠姐
    2020-11-30 10:34

    This is not allowed because of security reasons. onbeforeunload is an browser API that have different behaviors on different Browsers.

提交回复
热议问题