This time I will show you how to use jquery layur pop-up layer in practical projects, and what are the precautions for using jquery layur 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>
html code
<input id="about" type="button" value="修改考勤" class="layui-btn layui-btn-normal" />
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>
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 make infinite loading data requirements at the bottom of the sliding page
vue triggers the mobile scroll bar event
The above is the detailed content of How to use jquery layur popup layer in actual projects. For more information, please follow other related articles on the PHP Chinese website!