关闭 [removed] var btn = document.getElementById('btn') btn.onclick = function () { if (confirm()) { window.close() } } [removed]