您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

layui打开的layer的iframe窗口怎么关闭

2024/3/28 5:05:44发布17次查看
(1)关闭特定iframe
//当在iframe页面关闭自身时,在iframe页执行以下js脚本var index = parent.layer.getframeindex(window.name); //先得到当前iframe层的索引parent.layer.close(index); //再执行关闭
(2)父页面传参到iframe弹出层
var collectionid = parent.$("#hidecollectionid").val();//可在父页面定义隐藏域,id为hidecollectionid,需要引用jquery
(3)关闭所有弹出层
 如果没有弹层叠加等复杂逻辑,可根据需要关闭所有弹出层
layer.closeall(); //疯狂模式,关闭所有层layer.closeall('dialog'); //关闭信息框layer.closeall('page'); //关闭所有页面层layer.closeall('iframe'); //关闭所有的iframe层layer.closeall('loading'); //关闭加载层layer.closeall('tips'); //关闭所有的tips层
推荐教程:layui教程
以上就是layui打开的layer的iframe窗口怎么关闭的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product