window.onbeforeunload = function () { return confirm('你确定要关闭吗?'); }