gpt4 book ai didi

springboot bootcdn使用示例详解

转载 作者:qq735679552 更新时间:2022-09-27 22:32:09 28 4
gpt4 key购买 nike

CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.

这篇CFSDN的博客文章springboot bootcdn使用示例详解由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.

应用:直接使用bootcdn提供的静态资源,不需要本地存储 。

bootcdn 官网:https://www.bootcdn.cn/ 。

staticfile cdn官网: http://www.staticfile.org/ 。

常用静态资源 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# layui.js
https: //cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.js
https: //cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.js
 
# layui.css
//unpkg.com/layui@2.6.8/dist/css/layui.css
https: //www.layuicdn.com/layui-v2.6.8/css/layui.css
 
# jquery
https: //cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js
https: //cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js
 
# bootstrap
https: //cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.css
https: //cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.min.css
 
# react
https: //cdn.bootcdn.net/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.js
https: //cdn.bootcdn.net/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.min.js
 
# vue
https: //cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.cjs.js
https: //cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.cjs.min.js

********************* 。

示例 。

*************** 。

配置文件 。

cdn.properties 。

?
1
2
layui=https: //cdn.bootcdn.net/ajax/libs/layui/2.6.8/layui.min.js
jquery=https: //cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js

*************** 。

前端页面 。

index.html 。

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang= "en" xmlns:th= "http://www.thymeleaf.org" >
<head>
     <meta charset= "UTF-8" >
     <title>Title</title>
     <script th:src= "${application.jquery}" ></script>
     <script th:src= "${application.layuijs}" ></script>
     <link rel= "stylesheet" th:href= "${application.layuicss}" >
     <!--
     <script>
         $( function (){
             $( "#btn" ).click( function (){
                 alert( "hello world" );
             })
         })
     </script>-->
     <script>
         layui.use( 'layer' , function (){
             var layer=layui.layer;
 
             $( "#btn" ).click( function (){
                 $( "#1" ).html( "瓜田李下<br>" );
 
                 layer.msg( 'hello' )
             })
         })
     </script>
</head>
<body>
<div th:align= "center" >
     <span id= "1" style= "background-color: purple;font-size: large" ></span><br>
     <button id= "btn" class= "layui-btn" >点击一下</button>
</div>
</body>
</html>

********************* 。

到此这篇关于springboot bootcdn使用的文章就介绍到这了,更多相关springboot bootcdn内容请搜索我以前的文章或继续浏览下面的相关文章希望大家以后多多支持我! 。

原文链接:https://blog.csdn.net/weixin_43931625/article/details/119578346 。

最后此篇关于springboot bootcdn使用示例详解的文章就讲到这里了,如果你想了解更多关于springboot bootcdn使用示例详解的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com