javascript实现关闭页面确认提示窗口 <html> <head> <title>茶界网-确认关闭页面提示窗口</title> <meta http-equiv="content-Type" content="text/html;charset=gb2312"> </head> <!--把下面代码加到<body>与</body>之间--> <body onbeforeunload="event.returnValue='你的页面数据尚未保存,确定退出茶界网吗?';"> 关闭窗口试试! </body> </html>