王涛 副教授(特聘)Tao Wang Dr., Assoc. Prof. - 杏悦2
const switchLangBtn = document.getElementById('switchLang');
const sendMailBtn = document.getElementById('sendMail');
const paperListBtn = document.getElementById('paperList');
const zhElements = document.querySelectorAll('.zh');
const enElements = document.querySelectorAll('.en'); let isEnglish = false; // Track the current language state switchLangBtn.addEventListener('click', () => {
isEnglish = !isEnglish; // Toggle language state
zhElements.forEach(el => el.classList.toggle('hidden'));
enElements.forEach(el => el.classList.toggle('hidden')); // Update the button labels based on the current language
if (isEnglish) {
switchLangBtn.textContent = '切换到中文';
sendMailBtn.textContent = 'Send E-mail';
paperListBtn.textContent = 'Paper List';
} else {
switchLangBtn.textContent = 'Switch to English';
sendMailBtn.textContent = '发送邮件';
paperListBtn.textContent = '论文列表';
}
});
sendMailBtn.addEventListener('click', () => {
window.location.href = 'mailto:wangtao@ecust.edu.cn';
}); paperListBtn.addEventListener('click', () => {
window.location.href = 'https://orcid.org/0000-0003-2257-6900';
});