To check if an element contains a class, you use the contains() method of the classList property of the element: element.classList.contains(className);.
確定! 回上一頁