如何修改此操作以便檢查彈出式窗口是否已打開?檢查彈出式窗口是否已打開
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=100');");
}
/////////////編輯NO2
var options = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=100";
var popup = window.open(URL, "popup", options);
function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=100');"); }
我的JS調用
<a id="floating_link" href="javascript:popUp('MyPage.html')">Player</a>
noooooooooooo !!!!!!!!!!!!! eval #ftf! – 2010-11-09 18:50:25
它不是一個http回調,它只是使用局部變量。這看起來像eval的一個非常安全的使用。放鬆。 – 2010-11-09 18:51:52
@ Travis,是的,我看到了,但仍然... – 2010-11-09 18:53:48