classname has javascript code example
Example 1: javascript hass class
if (myElement.classList.contains('someClassname')) {
// do something
}
Example 2: how to check has class name in js?
element.classList.contains(className);Code language: CSS (css)