<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <mce:script type="text/javascript"><!-- var flag = true; function LeavePage(){ var userAgent = navigator.userAgent; var isChrome = userAgent.indexOf("Chrome") > -1 ; if(isChrome){ flag = false; return "Are you sure you want to navigate away from this page?";} else { flag = false; return ""; } } // --></mce:script> </head> <body onbeforeunload = "return LeavePage();"> <a href="javascript:window.print();" mce_href="javascript:window.print();">PRINT</a> </body> </html>