0
通常我的問題是如何在窗口數組中找到哪一個被關閉?如何查看某個名稱的窗口是否關閉?
我打開了很多彈出式窗口,並使泰姆留在上面。但是我發現問題是否已經關閉了窗戶。所以,我做這樣的事情:
var exNames = []; var wins = []; var w=0; var h=0; var maxHeight = 0;
openWin = function(name, width, height){
var myJoin = "|" + exNames.join("|") + "|";
if(myJoin.indexOf('|'+name+'|') == -1){
if(height > maxHeight){ maxHeight = height + 5;}
if(screen.width - w - width < 0){w=0; h=h+maxHeight; top=h+1; maxHeight=0; if(screen.height - h - height < 0){h=0;} }
left=w+1;
tops=h+1;
w=w+width+7;
var file='./'+name+'.flv?action=read';
var settings='width='+width+', height='+height+', left='+left+', top='+tops+', screenX='+left+', screenY='+tops;
wins.push(window.open(file, name, settings));
exNames.push(name);
} for (var i = 0; i < wins.length; ++i)
wins[i].focus();
}
,我需要知道如果有人向我的名字這是已經打開和關閉,以恢復該窗口中的窗口。如何做這樣的事情?