function 1() { document.getElementById("id1").style.background = "#199ed8"; document.getElementById("id2").style.background = "#e4e4e4"; document.getElementById("id2").style.color = "#fff"; document.getElementById("id1").style.color = "#000000"; } function 2() { document.getElementById("id1").style.background = "#e4e4e4"; document.getElementById("id2").style.background = "#199ed8"; document.getElementById("id2").style.color = "#fff"; document.getElementById("id1").style.color = "#000000"; }
设置两个按钮互相切换
最新推荐文章于 2024-04-06 22:45:39 发布