弹出窗口放置于原窗口后面

 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();
                }
            }
让弹出框先失去焦点,后让WINDOW得到焦点即可.当浏览器可以让网站弹出窗口的时候有点小问题...
posted @ 2012-04-17 17:24  liushan  阅读(335)  评论(0编辑  收藏  举报