当前位置:网站首页>Layer pop-up layer closing problem
Layer pop-up layer closing problem
2022-07-07 12:50:00 【Full stack programmer webmaster】
When adding or modifying , Data needs to be submitted to the background for processing , At this time, the best state after adding successfully is to close the pop-up layer and refresh the data information of the list , I have always wanted to achieve this , But it has never been successful , Today, I decided to do a good job , I've seen it carefully layer After the help manual and consulting materials , With the following solutions :
One 、 Close the pop-up window
This is a layer The help manual given on the official website , The explanations were quite detailed
There are two cases :
1、 When the pop-up layer is not a new page , Get the index of the pop-up window directly , And then execute close Method
layer.close();
2、 When the pop-up window is a new page
var index=parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
Two 、 Refresh the parent page after closing the pop-up window
for example : When adding users , Adding will pop up a new pop-up page , After adding success, there will be suggestive small alert, After clicking OK , Pop up page closes , And refresh the page data of the user list .
Just add this when closing the pop-up window window.parent.location.reload();// Refresh parent page
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113462.html Link to the original text :https://javaforall.cn
边栏推荐
猜你喜欢
Minimalist movie website
[statistical learning methods] learning notes - improvement methods
Leetcode question brushing: binary tree 26 (insertion operation in binary search tree)
2022聚合工艺考试题模拟考试题库及在线模拟考试
Common knowledge of one-dimensional array and two-dimensional array
Day-18 hash table, generic
Multi row and multi column flex layout
Connect to blog method, overload, recursion
Leetcode brush questions: binary tree 19 (merge binary tree)
【统计学习方法】学习笔记——提升方法
随机推荐
【统计学习方法】学习笔记——支持向量机(下)
[疑难杂症]pip运行突然出现ModuleNotFoundError: No module named ‘pip‘
Day-24 UDP, regular expression
密码学系列之:在线证书状态协议OCSP详解
什么是ESP/MSR 分区,如何建立ESP/MSR 分区
非分区表转换成分区表以及注意事项
2022a special equipment related management (boiler, pressure vessel and pressure pipeline) simulated examination question bank simulated examination platform operation
[statistical learning method] learning notes - logistic regression and maximum entropy model
[crawler] avoid script detection when using selenium
免费手机号码归属地API查询接口
2022 practice questions and mock examination of the third batch of Guangdong Provincial Safety Officer a certificate (main person in charge)
Leetcode brush questions: binary tree 19 (merge binary tree)
leetcode刷题:二叉树26(二叉搜索树中的插入操作)
Creation and assignment of graphic objects
普乐蛙小型5d电影设备|5d电影动感电影体验馆|VR景区影院设备
Day-18 hash table, generic
HZOJ #236. 递归实现组合型枚举
Cookie
leetcode刷题:二叉树19(合并二叉树)
GCC compilation error