js原生判断元素是否包含制定类
2020-09-27 17:50:13

var node = document.getElementById('demo')
if (node.classList.contains('class')) {
    console.log('包含制定的class');
}
友情链接