$(function(){ $('#btnQuit').click(function(){ if(confirm("确定要退出本系统吗?")) { window.opener = null; window.close(); } }); });