日期列追加星期几、自定义浮层tooltip替代原生title、恢复顶部标题
This commit is contained in:
+15
-1
@@ -41,8 +41,10 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<button class="toggle" id="toggle" onclick="toggleTheme()">🌙 暗夜</button>
|
<button class="toggle" id="toggle" onclick="toggleTheme()">🌙 暗夜</button>
|
||||||
<p class="formula">振幅算法:近 5 日均振幅 = 过去 5 个交易日 (最高 − 最低) 的均值,结果四舍五入取整</p>
|
|
||||||
|
<h1>振幅锁仓策略</h1>
|
||||||
<p class="sub">SA2611 (纯碱) | FG2611 (玻璃) | 2026年7月</p>
|
<p class="sub">SA2611 (纯碱) | FG2611 (玻璃) | 2026年7月</p>
|
||||||
|
<p class="formula">振幅算法:近 5 日均振幅 = 过去 5 个交易日 (最高 − 最低) 的均值,结果四舍五入取整</p>
|
||||||
<div class="section collapsed" id="sa-section">
|
<div class="section collapsed" id="sa-section">
|
||||||
<h2 onclick="toggleSection('sa-section')"><span class="arrow">▼</span> SA2611 纯碱</h2>
|
<h2 onclick="toggleSection('sa-section')"><span class="arrow">▼</span> SA2611 纯碱</h2>
|
||||||
<table>
|
<table>
|
||||||
@@ -151,5 +153,17 @@ document.querySelectorAll('table').forEach(function(tbl) {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 日期追加星期几
|
||||||
|
document.querySelectorAll('td:first-child').forEach(function(td) {
|
||||||
|
var t = td.textContent.trim();
|
||||||
|
var m = t.match(/^(\d{4})\/(\d{1,2})\/(\d{1,2})$/);
|
||||||
|
if (!m) return;
|
||||||
|
var d = new Date(+m[1], +m[2] - 1, +m[3]);
|
||||||
|
var w = ['周日','周一','周二','周三','周四','周五','周六'][d.getDay()];
|
||||||
|
td.textContent = t + ' ' + w;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user