]; 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 calls the elastic layer method

藏色散人
藏色散人Original
2020-11-24 10:43:092592browse

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

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>

2. Call the layer module in layui

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

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!

Statement:
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