可以在onload事件中借助userData设置一个变量来存储窗口加载的那个页面,在onbeforeunload事件中来访问此变量The userData behavior persists data across sessions, using one UserData store for each object. The UserData store is persisted in the cache using the save and load methods. Once the UserData store has been saved, it can be reloaded even if Microsoft® Internet Explorer has been closed and reopened.
我们完成可以用Alt+F4来关闭.