html 操纵dom classLIst 属性
标签:
1.classList 属性可以给指定的dom 增加多个class,他是只读的,只可以使用 add() 和 remove() 要领改削。
eg: document.getElementById("myDIV").classList.add("mystyle", "anotherClass", "thirdClass");具体见菜鸟教程:https://www.runoob.com/jsref/prop-element-classlist.html
html 操纵dom classLIst 属性
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/31474.html