MediaWiki:Y tabbar.js

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
function switchFirstLevel(language) {
    const chineseContainer = document.getElementById('chinese');
    const japaneseContainer = document.getElementById('japanese');
    if (language === 'chinese') {
        chineseContainer.style.display = 'block';
        japaneseContainer.style.display = 'none';
    } else {
        chineseContainer.style.display = 'none';
        japaneseContainer.style.display = 'block';
    }
}

function switchSecondLevel(contentId) {
    const contents = document.querySelectorAll('.content');
    contents.forEach(content => {
        if (content.id === contentId) {
            content.style.display = 'block';
        } else {
            content.style.display = 'none';
        }
    });
}