layui method of calling the elastic layer: 1. Reference the independent [layer.js] file, the code is such as []; 2. Call The layer module in layui, the code is like [ayer.msg('hello');].
Recommended: "layUI Tutorial"
The operating environment of this tutorial: windows10 system, layui2.5.6 version, the The method is applicable to all brands of computers.
Two calling methods:
1. Reference the independent layer.js file
After introducing layer.js, you can use it directly
<script src="layer.js"></script> <script> layer.msg('hello'); </script>
2. Call the layer module in layui
layui.use('layer', function(){ var layer = layui.layer; layer.msg('hello'); });
The above is the detailed content of Layui calls the elastic layer method. For more information, please follow other related articles on the PHP Chinese website!