This commit is contained in:
贤心 2022-06-22 01:39:26 +08:00
parent b400a9befb
commit 2a3f19eff8

View File

@ -35,28 +35,28 @@ Layui 是一套开源的 Web UI 组件库,采用自身经典的模块化规范
```html ```html
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>开始使用 Layui</title> <title>开始使用 Layui</title>
<link rel="stylesheet" href="./layui/css/layui.css"> <link rel="stylesheet" href="./layui/css/layui.css">
</head> </head>
<body> <body>
<!-- 你的 HTML 代码 -->
<script src="./layui/layui.js"></script> <!-- 你的 HTML 代码 -->
<script>
// 使用组件 <script src="./layui/layui.js"></script>
layui.use(['layer', 'form'], function(){ <script>
var layer = layui.layer; // 使用组件
var form = layui.form; layui.use(['layer', 'form'], function(){
var layer = layui.layer;
// 欢迎语 var form = layui.form;
layer.msg('Hello World');
}); // 欢迎语
</script> layer.msg('Hello World');
</body> });
</script>
</body>
</html> </html>
``` ```