How to close the current pop-up window in layui
Nov 23, 2020 pm 03:03 PMLayui 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!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What should I do if there are no pop-up reminders for calendar events in Win10? How to recover if calendar event reminders are gone in Win10

How to set up jump on layui login page

How to solve the problem of Win11 pop-up windows that cannot be closed

What should I do if pop-up windows always appear in Win11? How to solve the problem of pop-up windows when opening a software in Win11

How to open the 360 browser pop-up window

Which one is better, layui or elementui?
