<div id="test">零五网(www.02405.com)</div>

<script>
let test = document.getElementById("test");
//原生js添加元素class类名
test.classList.add("active");
//原生js删除元素class类名
test.classList.remove("active");
</script>

引申阅读:JQuery添加或删除class类名

(adsbygoogle = window.adsbygoogle || []).push({});