單項選擇題以下哪個方法可以檢測該元素是否有active這個類名?()

A.classList.hasClass(’active’)
B.classList.contains(’active’)
C.classList.add(’active’)
D.classList.remove(’active’)


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題以下哪個方法用來刪除節(jié)點的?()

A.appendChild()
B.removeChild()
C.appendTo()
D.remove()