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

Detailed explanation of the use of jquery layui pop-up layer

php中世界最好的语言
Release: 2018-04-27 13:54:51
Original
2206 people have browsed it

This time I will bring you jquery a detailed explanation of the use of layui pop-up layer, what are the precautions when 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:

JS summary of random number methods

##Query snowflake falling special effects (with code)

The above is the detailed content of Detailed explanation of the use of jquery layui pop-up 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!