If you want to know more about layui, you can click: layui tutorial
## There are three types of layui pop-up windows, namely: 1. Confim type; 2. Open type pop-up box; 3. Msg type. Let me introduce you one by one how to use these pop-up windows.1: Confim type usage method
layui.use('layer', function(){ layer.confirm('是否立即上传卷宗信息?', { btn: ['是','否'], time: 200000, //20s后自动关闭 },function(index){ alert("这是点击确定按钮走的回调") layer.close(index); },function(){ alert("这是点击取消按钮走的回调") }); })
2: Open type pop-up box, the content parameter can be a choice The device can also be a path
layer.open({ type : 1, title : "借阅时间", area : [ '450px', '300px' ], content : $("#borrowCase"), btn: ['确定', '取消'], yes: function(index){ alert("这是点击确定按钮走的回调") }, btn2: function(){ alert("这是点击取消按钮走的回调") }, end:function(){ alert('这是点击任一按钮都会走的回调') } }); layui.use('layer',function(){ var layer=layui.layer; layer.open({ type:2, title:'新增字段信息', area:['450px','300px'], content: "dictionary/addFiled?dictionaryId="+dictionaryId//字段类型 }) })
3: msg type
layer.msg('添加借阅成功', { time: 1500, //1500ms后自动关闭 });
4: Close the pop-up window
layer_close(index)关闭当前弹窗 parent.layer.closeAll()关闭所有的弹窗
The above is the detailed content of How to use layui pop-up window. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

Dreamweaver CS6
Visual web development tools
