广告
返回顶部
首页 > 资讯 > 后端开发 > Python >springboot bootcdn使用示例详解
  • 704
分享到

springboot bootcdn使用示例详解

2024-04-02 19:04:59 704人浏览 薄情痞子

Python 官方文档:入门教程 => 点击学习

摘要

应用:直接使用bootcdn提供的静态资源,不需要本地存储 bootcdn 官网:https://www.bootcdn.cn/ staticfile cdn官网: Http://w

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

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

staticfile cdn官网: Http://www.staticfile.org/

常用静态资源


# 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">点击一下</button>
</div>
</body>
</html>

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

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

--结束END--

本文标题: springboot bootcdn使用示例详解

本文链接: https://www.lsjlt.com/news/132277.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作