In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use Layui, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Layui (homophonic: class UI) is a front-end UI framework written by its own module specification, which follows the writing and organization form of native HTML/CSS/JS. It has a very low threshold and is ready to use. Very suitable for the rapid development of the interface.
After you get the layui and deploy it completely to your project directory (or static resource server), you only need to introduce the following two files:
. / layui/css/layui.css./layui/layui.js / / Tip: if it is in a non-modular way (explained at the bottom), it can be replaced here with:. / layui/layui.all.js
That's right, you don't have to worry about any other files. Because they (such as modules) are only loaded automatically when they are finally used.
This is a basic getting started page:
Start using layui / / generally write layui.use directly in a js file (['layer',' form'], function () {var layer = layui.layer, form = layui.form; layer.msg ('Hello World');})
Note: to use layui, you need to load the module first, and the module is preloaded in the above code! If you do not load the module at first, you will directly layer. If you use it, the runtime will report an error! Other problems such as layer cannot be found or the method cannot be found!
Layui.use (['layer',' form'], function () {var layer = layui.layer, form = layui.form;})
Here is a code example I used:
Call layui:
Preload:
/ / layui layerlet layuiLayer;//layui preloads layui.use (['layer'], function () {layuiLayer = layui.layer;})
Use the layui object:
LayuiLayer.open ({title: 'prompt', content: 'please enter a name!' }) Thank you for reading this article carefully. I hope the article "how to use Layui" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.