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.
精彩评论