我将该下面代码加入了我自己的页面中,这样当我直接关闭IE窗口时也出现提示框,但是问题是我的页面上有不少打开新窗口的JavaScript语句,当点击它们时也出现了提示框,这是为什么? <body onbeforeunload="RunOnBeforeUnload()" id="Posts"> <script language="javascript">g_blnCheckUnload = true;function RunOnBeforeUnload() {if (g_blnCheckUnload) {window.event.returnValue = 'You will lose any unsaved content'; } } function bypassCheck() { g_blnCheckUnload = false;TempSave(document.getElementById('Editor_Edit_txbTitle'),Editor_Edit_ftbBody_ClientID.GetDocument().body.innerHTML); }</script> 相关文章: 2021-10-10 2022-12-23 2021-08-30 2022-01-13 2022-01-19 2022-01-09 2022-12-23 2021-07-14