十年網(wǎng)站開發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營維護(hù)+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
//LayerClose彈窗關(guān)閉

創(chuàng)新互聯(lián)專注于納溪網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供納溪營銷型網(wǎng)站建設(shè),納溪網(wǎng)站制作、納溪網(wǎng)頁設(shè)計(jì)、納溪網(wǎng)站官網(wǎng)定制、小程序制作服務(wù),打造納溪網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供納溪網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
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(); //瘋狂模式,關(guān)閉所有層
break;
case "fatherall":
parent.layer.closeAll(); //瘋狂模式,關(guān)閉所有層
break;
default:
break;
}
};
var LayerClose2= function(index,type){
if(typeof type =="undefined"){
return;
}
// 開始判斷
switch(type){
case "tips":
layer.closeAll('tips'); //關(guān)閉所有的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(); //瘋狂模式,關(guān)閉所有層
break;
case "fatherall":
parent.layer.closeAll(); //瘋狂模式,關(guān)閉所有層
break;
default:
break;
}
};
// 關(guān)閉刷新
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");//關(guān)閉彈窗
// window.location.reload();
break;
case "refreshTable":
Layerclose("FrameIndex");
$('#tablelist').bootstrapTable('refresh');
break;
default:
break;
}
}以上這篇LayerClose彈窗關(guān)閉刷新方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持創(chuàng)新互聯(lián)。