Home > Web Front-end > JS Tutorial > body text

How to use jquery layui popup layer

php中世界最好的语言
Release: 2018-06-02 14:13:49
Original
1523 people have browsed it

This time I will show you how to use jquery layui pop-up layer. What are the precautions for using jquery layui pop-up layer? The following is a practical case, let's take a look.

Jquery must be greater than 1.83

layui must be all, otherwise it will not be displayed

<script src="../js/jquery-1.8.3.min.js"></script> 
 <script src="../layui/layui.all.js"></script>
Copy after login

html code

<input id="about" type="button" value="修改考勤" class="layui-btn layui-btn-normal" />
Copy after login

Main js code

<script>
 $('input#about').on('click', function () {
 layer.confirm('是否要修改123的考勤?', {
btn: ['确定', '取消', ] //按钮
},
function () {
 layer.msg('修改成功', { time: 800, icon: 1 });
 // layer.msg('网络连接失败', { time: 800, icon: 2 });
 },
 function () {
 layer.msg('未作任何修改', {
time: 800, //20s后自动关闭
});
 }
 );
});
 </script>
Copy after login

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Recommended reading:

How to use the image display plug-in highslide.js in jQuery

How to use Angularjs custom instructions

The above is the detailed content of How to use jquery layui popup layer. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!