Spaces:
Runtime error
Runtime error
document.addEventListener('DOMContentLoaded', function () { | |
// 添加交互性功能 | |
const tabButtons = document.querySelectorAll('.tab-button') | |
const tabContents = document.querySelectorAll('.tab-content') | |
tabButtons.forEach((button) => { | |
button.addEventListener('click', () => { | |
const tabId = button.getAttribute('data-tab') | |
tabButtons.forEach((btn) => btn.classList.remove('active')) | |
tabContents.forEach((content) => content.classList.remove('active')) | |
button.classList.add('active') | |
document.getElementById(tabId).classList.add('active') | |
}) | |
}) | |
// 添加图表交互性(如果需要) | |
// 这里可以添加与 Plotly 图表交互的代码 | |
}) | |