How to close the current pop-up window in layui

王林
Release: 2020-11-30 11:29:00
Original
10457 people have browsed it

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.

How to close the current pop-up window in layui

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);//关闭窗口
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template