开发者

How to run a javascript when browser process is killed?

I hav onUnload="cleanup()" defined in my html body tag. The cleanup() method in javascript is

f开发者_如何学Pythonunction cleanup() {--clean up session--}.

But when the browser is terminated by killing the process using task manager, I want to do the same action as cleanup. How can this be done?


You cannot. If the process is forcefully killed, nobody cares about your scripts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜