原生js

html里实现增加class,删除class

document.getElementById("operateCon").classList.add('icon-guanzhu');

document.getElementById("operateCon").classList.remove('icon-guanzhu');


html里实现div的隐藏与显示

document.getElementById('isShowfujian').style.display = "none";

document.getElementById('isShowfujian').style.display = "block";



你可能感兴趣的:(js)