layer.msg 设置几秒钟后关闭打开的iframe层

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_37164847/article/details/88896894

             layer.msg("保存成功",{time:1*1000},function(){
                 var iframe_index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                console.log("当前iframe层的索引:"+iframe_index+"==window.name:"+window.name);
                parent.layer.close(iframe_index); //再执行关闭                 
             });

猜你喜欢

转载自blog.csdn.net/qq_37164847/article/details/88896894