Home Web Front-end Layui Tutorial How to close the current pop-up window in layui

How to close the current pop-up window in layui

Nov 23, 2020 pm 03:03 PM
layui Pop-ups

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!

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

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

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 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 Jun 09, 2024 pm 02:52 PM

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 get form data in layui How to get form data in layui Apr 04, 2024 am 03:39 AM

How to get form data in layui

How to set up jump on layui login page How to set up jump on layui login page Apr 04, 2024 am 03:12 AM

How to set up jump on layui login page

How to solve the problem of Win11 pop-up windows that cannot be closed How to solve the problem of Win11 pop-up windows that cannot be closed Dec 22, 2023 pm 05:13 PM

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 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 Mar 01, 2024 am 08:43 AM

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 How to open the 360 ​​browser pop-up window Mar 28, 2024 pm 09:31 PM

How to open the 360 ​​browser pop-up window

Which one is better, layui or elementui? Which one is better, layui or elementui? Apr 04, 2024 am 04:15 AM

Which one is better, layui or elementui?

How layui implements self-adaptation How layui implements self-adaptation Apr 26, 2024 am 03:00 AM

How layui implements self-adaptation

See all articles