window.onbeforeunload = function(event) { return confirm("确定退出吗"); }