search
HomeWeb Front-endLayui TutorialHow to use open attribute to hide button in layui

How to use open attribute to hide button in layui

Nov 24, 2020 am 09:53 AM
layuiopenbutton

Layui uses the open attribute to hide the button: This can be achieved by adding the style [closeBtn:0] in the [layer.open] method. Layer provides two styles of close buttons, which can be configured by 1 and 2 to show.

How to use open attribute to hide button 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.

(Learning video sharing: javascript video tutorial)

layui method to hide the button using the open attribute:

Method:

You can add the closeBtn:0 style in the layer.open method to achieve hiding.

closeBtn - 关闭按钮

Type:

String/Boolean, default: 1

layer provides two styles of close buttons, which can be displayed by configuring 1 and 2. If not displayed , then closeBtn: 0

Example:

layui.use('layer', function () {

        var layer = layui.layer;

        layer.open({
            skin: 'demo-class',
            type: 1,
            title: '登录',
            area: ['600px', '700px'],
            closeBtn :0,
            content: $('.login')//这里content是一个普通的String
        });
    });

Related recommendations:layui

The above is the detailed content of How to use open attribute to hide button in layui. For more information, please follow other related articles on the PHP Chinese website!

Statement
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 AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.