浏览器关闭标签的事件

From http://stackoverflow.com/questions/1631959/browser-window-close-event