js原生判断元素是否包含指定类
2020-12-24 20:50:41

var node = document.getElementById('demo')
if (node.classList.contains('class')) {
    console.log('包含制定的class');
}
每日一句
People find pleasure in different ways. I find it in keeping my mind clear. - Marcus Aurelius