当前位置:网站首页>layer弹出层的关闭问题
layer弹出层的关闭问题
2022-07-07 10:37:00 【全栈程序员站长】
就是在执行添加或修改的时候,需要将数据提交到后台进行处理,这时候添加成功之后最理想的状态是关闭弹出层并且刷新列表的数据信息,之前一直想实现这样,可一直没有成功,今天决定好好弄一弄,在仔细看过layer的帮助手册以及查阅资料之后,有了以下的解决办法:
一、关闭弹出窗
这是layer官网给出的帮助手册,讲解的比较详细
分成两种情况:
1、弹出层不是新的页面的时候,直接获得该弹窗的索引,然后执行close方法
layer.close();
2、弹出窗是新的页面的时候
var index=parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
二、关闭弹窗之后刷新父页面
例如:在增加用户的时候,增加会弹出一个新的弹窗页面,增加成功之后会有提示性的小的alert,在点击确定之后,弹窗页面关闭,并且刷新用户列表的页面数据。
只需要在关闭弹窗的时候加这个window.parent.location.reload();//刷新父页面
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/113462.html原文链接:https://javaforall.cn
边栏推荐
- AirServer自动接收多画面投屏或者跨设备投屏
- Attack and defense world ----- summary of web knowledge points
- In the small skin panel, use CMD to enter the MySQL command, including the MySQL error unknown variable 'secure_ file_ Priv 'solution (super detailed)
- Charles: four ways to modify the input parameters or return results of the interface
- [疑难杂症]pip运行突然出现ModuleNotFoundError: No module named ‘pip‘
- Tutorial on principles and applications of database system (009) -- conceptual model and data model
- Pule frog small 5D movie equipment | 5D movie dynamic movie experience hall | VR scenic area cinema equipment
- Inverted index of ES underlying principle
- [statistical learning methods] learning notes - Chapter 4: naive Bayesian method
- Will the filing free server affect the ranking and weight of the website?
猜你喜欢
Inverted index of ES underlying principle
AirServer自动接收多画面投屏或者跨设备投屏
2022A特种设备相关管理(锅炉压力容器压力管道)模拟考试题库模拟考试平台操作
对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景
About sqli lab less-15 using or instead of and parsing
leetcode刷题:二叉树19(合并二叉树)
Static routing assignment of network reachable and telent connections
SQL lab 11~20 summary (subsequent continuous update) contains the solution that Firefox can't catch local packages after 18 levels
Cookie
Common knowledge of one-dimensional array and two-dimensional array
随机推荐
Attack and defense world ----- summary of web knowledge points
The left-hand side of an assignment expression may not be an optional property access. ts(2779)
Error in compiling libssl
【二叉树】删点成林
图形对象的创建与赋值
About IPSec
SQL blind injection (WEB penetration)
[pytorch practice] image description -- let neural network read pictures and tell stories
2022广东省安全员A证第三批(主要负责人)考试练习题及模拟考试
(to be deleted later) yyds, paid academic resources, please keep a low profile!
Airserver automatically receives multi screen projection or cross device projection
Sort out the garbage collection of JVM, and don't involve high-quality things such as performance tuning for the time being
SQL Lab (36~40) includes stack injection, MySQL_ real_ escape_ The difference between string and addslashes (continuous update after)
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
Day-16 set
[爬虫]使用selenium时,躲避脚本检测
The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
[statistical learning methods] learning notes - Chapter 4: naive Bayesian method
浅谈估值模型 (二): PE指标II——PE Band
跨域问题解决方案