document.onclick = function(){
var pop = window.open('http://www.wallytim.com/xx.html', '', 'height=' + '768' + ',width=' + '1024' + ',left=' + ((screen.width - 1024) / 2) + ',top=' + ((screen.height - 768) / 2) + ',toolbar=0,status=0,menubar=0,scrollbars=1,resizable=1');
if (typeof pop != 'undefined') {
pop.blur();
if (parseInt(navigator.appVersion) >= 4 && typeof pop.window != 'undefined')
var temp = pop.window.open("about:blank").close();
window.focus();
}
}
var pop = window.open('http://www.wallytim.com/xx.html', '', 'height=' + '768' + ',width=' + '1024' + ',left=' + ((screen.width - 1024) / 2) + ',top=' + ((screen.height - 768) / 2) + ',toolbar=0,status=0,menubar=0,scrollbars=1,resizable=1');
if (typeof pop != 'undefined') {
pop.blur();
if (parseInt(navigator.appVersion) >= 4 && typeof pop.window != 'undefined')
var temp = pop.window.open("about:blank").close();
window.focus();
}
}
让弹出框先失去焦点,后让WINDOW得到焦点即可.当浏览器可以让网站弹出窗口的时候有点小问题...