当前位置:网站首页>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
边栏推荐
- Charles: four ways to modify the input parameters or return results of the interface
- BGP third experiment report
- JS to convert array to tree data
- Several ways to clear floating
- [statistical learning methods] learning notes - Chapter 4: naive Bayesian method
- Cookie
- NPM instal reports agent or network problems
- How to apply @transactional transaction annotation to perfection?
- Airserver automatically receives multi screen projection or cross device projection
- Leetcode skimming: binary tree 22 (minimum absolute difference of binary search tree)
猜你喜欢
2022 polymerization process test question simulation test question bank and online simulation test
RHSA first day operation
如何将 @Transactional 事务注解运用到炉火纯青?
Several ways to clear floating
The left-hand side of an assignment expression may not be an optional property access. ts(2779)
什么是ESP/MSR 分区,如何建立ESP/MSR 分区
How to apply @transactional transaction annotation to perfection?
Multi row and multi column flex layout
Leetcode brush questions: binary tree 19 (merge binary tree)
处理链中断后如何继续/子链出错removed from scheduling
随机推荐
【深度学习】图像多标签分类任务,百度PaddleClas
2022-07-07 Daily: Ian Goodfellow, the inventor of Gan, officially joined deepmind
Connect to blog method, overload, recursion
【PyTorch实战】用PyTorch实现基于神经网络的图像风格迁移
BGP third experiment report
idm服务器响应显示您没有权限下载解决教程
处理链中断后如何继续/子链出错removed from scheduling
Day-19 IO stream
【从 0 开始学微服务】【03】初探微服务架构
Guangzhou held work safety conference
3D content generation based on nerf
AirServer自动接收多画面投屏或者跨设备投屏
The IDM server response shows that you do not have permission to download the solution tutorial
【统计学习方法】学习笔记——提升方法
2022 examination questions and online simulation examination for safety production management personnel of hazardous chemical production units
Preorder, inorder and postorder traversal of binary tree
Realize a simple version of array by yourself from
2022a special equipment related management (boiler, pressure vessel and pressure pipeline) simulated examination question bank simulated examination platform operation
Aike AI frontier promotion (7.7)
[statistical learning method] learning notes - support vector machine (Part 2)