var btn=document.getElementById('btn')
switch(btn.innerHTML){
case '正常':btn.innerHTML='不正常' break
case '不正常':btn.innerHTML='正常' break
}
} <button id="btn" onclick="return test()">正常</button>
var btn=document.getElementById('btn')
switch(btn.innerHTML){
case '正常':btn.innerHTML='不正常' break
case '不正常':btn.innerHTML='正常' break
}
} <button id="btn" onclick="return test()">正常</button>