📅  最后修改于: 2022-03-11 15:01:37.245000             🧑  作者: Mango
function myFunction(e) {
if (document.querySelector('#navList a.active') !== null) {
document.querySelector('#navList a.active').classList.remove('active');
}
e.target.className = "active";
}