springbootbootcdn使⽤⽰例详解应⽤:直接使⽤bootcdn提供的静态资源,不需要本地存储
常⽤静态资源
layui和bootstrap哪个好# layui.js
cdn.bootcdn/ajax/libs/layui/2.6.8/layui.js
cdn.bootcdn/ajax/libs/layui/2.6.8/layui.min.js
# layui.css
//unpkg/layui@2.6.8/dist/css/layui.css
www.layuicdn/layui-v2.6.8/css/layui.css
# jquery
cdn.bootcdn/ajax/libs/jquery/3.6.0/jquery.js
cdn.bootcdn/ajax/libs/jquery/3.6.0/jquery.min.js
# bootstrap
cdn.bootcdn/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.css
cdn.bootcdn/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap-grid.min.css
# react
cdn.bootcdn/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.js
cdn.bootcdn/ajax/libs/react-is/0.0.0-experimental-6f3fcbd6f-20210730/cjs/react-is.development.min.js
# vue
cdn.bootcdn/ajax/libs/vue/3.2.0-beta.7/vue.cjs.js
cdn.bootcdn/ajax/libs/vue/3.2.0-beta.7/vue.cjs.min.js
*********************
⽰例
***************
配置⽂件
cdn.properties
layui=cdn.bootcdn/ajax/libs/layui/2.6.8/layui.min.js
jquery=cdn.bootcdn/ajax/libs/jquery/3.6.0/jquery.min.js
***************
前端页⾯
index.html
<!DOCTYPE html>
<html lang="en" xmlns:th="">
<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" ></span><br>
<button id="btn" class="layui-btn">点击⼀下</button>
</div>
</body>
</html>
*********************
到此这篇关于springboot bootcdn使⽤的⽂章就介绍到这了,更多相关springboot bootcdn内容请搜索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。