当前位置:网站首页>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
边栏推荐
猜你喜欢
[statistical learning method] learning notes - logistic regression and maximum entropy model
The left-hand side of an assignment expression may not be an optional property access. ts(2779)
ps链接图层的使用方法和快捷键,ps图层链接怎么做的
Leetcode skimming: binary tree 23 (mode in binary search tree)
visual stdio 2017关于opencv4.1的环境配置
[crawler] avoid script detection when using selenium
Master formula. (used to calculate the time complexity of recursion.)
2022 examination questions and online simulation examination for safety production management personnel of hazardous chemical production units
2022a special equipment related management (boiler, pressure vessel and pressure pipeline) simulated examination question bank simulated examination platform operation
Image pixel read / write operation
随机推荐
3D content generation based on nerf
leetcode刷题:二叉树20(二叉搜索树中的搜索)
How to use PS link layer and shortcut keys, and how to do PS layer link
ip2long与long2IP 分析
GCC compilation error
Decrypt gd32 MCU product family, how to choose the development board?
[Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
ACL 2022 | 序列标注的小样本NER:融合标签语义的双塔BERT模型
【从 0 开始学微服务】【01】什么是微服务
Day-19 IO stream
Leetcode skimming: binary tree 23 (mode in binary search tree)
leetcode刷题:二叉树26(二叉搜索树中的插入操作)
[statistical learning method] learning notes - support vector machine (Part 2)
Preorder, inorder and postorder traversal of binary tree
Minimalist movie website
leetcode刷题:二叉树23(二叉搜索树中的众数)
数据库安全的重要性
【统计学习方法】学习笔记——支持向量机(下)
[deep learning] image multi label classification task, Baidu paddleclas
BGP actual network configuration