<html> <head> <title>test</title> <script language ="javaScript"> <!--Close the browser--> var flag = true; window.onbeforeunload = function () { if (flag) { var evt = window.event || arguments[0]; var userAgent = navigator.userAgent; if (userAgent.indexOf("MSIE") > 0) { var n = window.event.screenX - window.screenLeft; var b = n > document.documentElement.scrollWidth - 20; if (b && window.event.clientY < 0 || window.event.altKey) { window.event.returnValue = ("This operation will cause abnormal exit from the system (correct exit system method: click the exit system button), did you confirm?"); }else { return ("This operation will cause abnormal exit from the system (correct exit system method: click the exit system button), did you confirm?"); } }else if (userAgent.indexOf("Firefox") > 0) { return ("This operation will cause abnormal exit from the system (correct exit system method: click the exit system button), did you confirm?"); } } } </script> </head> <body> dengyang <body></html>