qnloft-stock/template/zx_data_template.html

60 lines
2.6 KiB
HTML
Raw Permalink Normal View History

2023-11-24 15:29:22 +00:00
<!doctype html>
<html lang="zh-CN">
<head>
<!-- 必须的 meta 标签 -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap 的 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<title>复盘-我的自选</title>
</head>
<body>
<div id="head"></div>
<div class="container">
{{pills_tabContent}}
</div>
<!-- 选项 1jQuery 和 Bootstrap 集成包(集成了 Popper -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-7ymO4nGrkm372HoSbq1OY2DP4pEZnMiA+E0F3zPr+JQQtQ82gQ1HPY3QIVtztVua" crossorigin="anonymous">
</script>
<script>
// 使用 fetch 来加载 content.html 的内容,并将其插入到指定的容器中
document.addEventListener('DOMContentLoaded', function() {
fetch('../head.html')
.then(response => response.text())
.then(content => {
document.querySelector('#head').innerHTML = content;
});
});
// 使用 jQuery 来实现卡片切换和内容变换
$(document).ready(function() {
$('.nav-link').on('click', function(e) {
e.preventDefault();
// 获取目标选项卡内容的 ID
var targetId = $(this).data('target');
$('.nav-link').removeClass('active');
$(this).addClass('active');
// 隐藏所有选项卡内容
$('.tab-pane').removeClass('show active');
// 显示目标选项卡内容
$(targetId).addClass('show active');
});
});
</script>
<!-- 选项 2Popper 和 Bootstrap 的 JS 插件各自独立 -->
<!--
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-Lge2E2XotzMiwH69/MXB72yLpwyENMiOKX8zS8Qo7LDCvaBIWGL+GlRQEKIpYR04" crossorigin="anonymous"></script>
-->
</body>
</html>