📅  最后修改于: 2022-03-11 15:02:30.046000             🧑  作者: Mango
let btnName = document.getElementById('btnId');
btnName.addEventListener('click', ()=>{
let element = document.getElementById('elementId');
if (element.style.display != 'inline'){
element.style.display = 'inline';
}
else{
element.style.display = 'none'
}
})