Layui calls the elastic layer method

藏色散人
Release: 2020-11-30 13:54:52
Original
2587 people have browsed it

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');].

Layui calls the elastic layer method

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(&#39;hello&#39;); 
</script>
Copy after login

2. Call the layer module in layui

layui.use(&#39;layer&#39;, function(){
  var layer = layui.layer;
  
  layer.msg(&#39;hello&#39;);
});
Copy after login

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!

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