Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript-弹出新的父窗口_Javascript - Fatal编程技术网

Javascript-弹出新的父窗口

Javascript-弹出新的父窗口,javascript,Javascript,我有这个密码 function checkAlerts() { secondsSinceLoad += 1; for(var mj = 0 ; mj <= alertList.length; mj++) { if(alertList[mj]['time'] < secondsSinceLoad && alertList[mj]['time'] > -1 ) {

我有这个密码

function checkAlerts() {
    secondsSinceLoad += 1;
    for(var mj = 0 ; mj <= alertList.length; mj++) {
                    if(alertList[mj]['time'] < secondsSinceLoad && alertList[mj]['time'] > -1 ) {
                            alertmsg = alertList[mj]['type'] + ":" + alertList[mj]['name'] + "\n" +alertList[mj]['subtitle']+ "\n"+ alertList[mj]['description'] + "\n\n";
                            window.open(alertList[mj]['redirect'],"name1","width=800,height=500,toolbar=no,location=no,menubar=no,copyhistory=no");
                    }
    }
    alertsTimeoutId = setTimeout("checkAlerts()",1000);
功能检查警报(){
secondsSinceLoad+=1;
对于(var mj=0;mj-1){
alertmsg=alertList[mj]['type']+':“+alertList[mj]['name']+”\n“+alertList[mj]['subtitle']+”\n“+alertList[mj]['description']+“\n\n”;
打开(alertList[mj]['redirect'],“name1”,“宽度=800,高度=500,工具栏=no,位置=no,菜单栏=no,复制历史=no”);
}
}
alertsTimeoutId=setTimeout(“checkAlerts()”,1000);
}

这是一个预定的弹出窗口。它正确地创建了一个弹出窗口,但是,如果同时有多个计划弹出窗口,则只显示一个弹出窗口

另外,我想这是因为“父弹出窗口打开了相同的窗口”

谢谢你的帮助


Thanx.

浏览器禁止在循环中打开多个弹出窗口,以阻止恶意网站用大量新窗口轰炸用户


通过避免弹出窗口并在单个窗口中显示所有内容来解决此问题。

无法同时处理多个弹出窗口。。。。