欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

springboot bootcdn使用示例詳解

 更新時間:2021年08月11日 10:02:30   作者:o_瓜田李下_o  
這篇文章主要介紹了springboot bootcdn使用,本文通過示例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

應(yīng)用:直接使用bootcdn提供的靜態(tài)資源,不需要本地存儲

bootcdn 官網(wǎng):https://www.bootcdn.cn/

staticfile cdn官網(wǎng): http://www.staticfile.org/

常用靜態(tài)資源

# 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

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

<!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">點(diǎn)擊一下</button>
</div>
</body>
</html>

*********************

到此這篇關(guān)于springboot bootcdn使用的文章就介紹到這了,更多相關(guān)springboot bootcdn內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論