使用VB的WebBrowser控件捕获页面关闭事件代码(适用于window.close()事件):
Private Sub WebBrowser1_WindowClosing(ByVal IsChildWindow As Boolean,Cancel As Boolean) Cancel = True Unload Me End Sub