Posted in Javascript onAugust 17, 2018
//LayerClose弹窗关闭
var LayerClose = function(type){ console.log(type); if(typeof type =="undefined"){ return; } // 开始判断 switch(type){ case "self": var index = layer.index layer.close(index); break; case "FrameIndex": var index = parent.layer.getFrameIndex(window.name); layer.close(index); break; case "selfall": layer.closeAll(); //疯狂模式,关闭所有层 break; case "fatherall": parent.layer.closeAll(); //疯狂模式,关闭所有层 break; default: break; } };
var LayerClose2= function(index,type){ if(typeof type =="undefined"){ return; } // 开始判断 switch(type){ case "tips": layer.closeAll('tips'); //关闭所有的tips层 break; case "loading": layer.closeAll('loading'); break; case "iframe": layer.closeAll('iframe'); break; case "dialog": layer.closeAll('dialog'); break; case "page": layer.closeAll('page'); break; default: break; } };
var LayerClose3 = function(o){ console.log(o.type); if(typeof o.type =="undefined"){ return; } // 开始判断 switch(o.type){ case "self": (!o.index)?layer.index:o.index layer.close(o.index); break; case "FrameIndex": //var index = parent.layer.getFrameIndex(window.name); (!o.index)?parent.layer.getFrameIndex(window.name):o.index layer.close(o.index); break; case "selfall": layer.closeAll(); //疯狂模式,关闭所有层 break; case "fatherall": parent.layer.closeAll(); //疯狂模式,关闭所有层 break; default: break; } };
// 关闭刷新
var layerReload = function(index,type){ if(typeof index =="undefined"||typeof type =="undefined"){ return; } // 开始判断 switch(type){ case "topreload": parent.window.location.reload(); break; case "reload": window.location.reload(); break; case "no": Layerclose("FrameIndex");//关闭弹窗 // window.location.reload(); break; case "refreshTable": Layerclose("FrameIndex"); $('#tablelist').bootstrapTable('refresh'); break; default: break; } }
以上这篇LayerClose弹窗关闭刷新方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。
LayerClose弹窗关闭刷新方法
- Author -
Alan_阿兰声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@