Previously mentioned method for accessing webpage custom events, if there are many events need to define how to do? Of course, we can continue to use the earlier method, but here there is a more concise way.
First, the introduction of layui.css style file
In the <head> tag write code:
<link rel="stylesheet" herf="/static/.../layui.css" media="all">
Second, the introduction of layui.js file
Write code in the <body> tag:
<script src="/static/.../layui.js"></script>
Third, script writing custom code