Layui method to close the current pop-up window: first get the name of the current window; then use [parent.layer.close(index);] to close the current window.
The operating environment of this tutorial: Windows 10 system, layui version 2.5.6. This method is suitable for all brands of computers.
layui method to close the current pop-up window:
(Learning video sharing:javascript video tutorial)
Ideas:
1. Get the name of the current window;
2. Close the window.
Implementation code:
var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name parent.layer.close(index);//关闭窗口
Related recommendations:layui
The above is the detailed content of How to close the current pop-up window in layui. For more information, please follow other related articles on the PHP Chinese website!