]; 2. Call the layer module in layui, the code is like [ ayer.msg('hello');]."/> ]; 2. Call the layer module in layui, the code is like [ ayer.msg('hello');].">
Home > Article > Web Front-end > Layui calls the elastic layer method
layui method of calling the elastic layer: 1. Reference the independent [layer.js] file, the code is such as [4643d6f74a31ae3b9ba3b525b46dc7c42cacc6d41bbb37262a98f745aa00fbf0]; 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!