添加:
节点.classList.add("类名");
例如:
li.classList.add('active');
删除:
节点.classList.remove("类名");
例如:
li.classList.remove('active');
节点.classList.add("类名");
例如:
li.classList.add('active');
节点.classList.remove("类名");
例如:
li.classList.remove('active');
個人網站原文地址:http://www.chengweinan.com/article/31 今天在個人網站上新增了一個“極客頻道”,使用的是二級域名geek.chengweinan.com。 新站點