JavaScript检测弹出窗口是否已经关闭
var win = window.open('foo.html', 'windowName',"width=200,height=200,scrollbars=no"); var timer = setInterval(function() { if(win.closed) { clearInterval(timer); alert('closed'); } }, 1000);
JavaScript检测弹出窗口是否已经关闭
var win = window.open('foo.html', 'windowName',"width=200,height=200,scrollbars=no"); var timer = setInterval(function() { if(win.closed) { clearInterval(timer); alert('closed'); } }, 1000);