MENU
Processing Classes
RESETRUNFULL
<!DOCTYPE html><html>
<head></head><body>
<p class="a b c">Show class, have pride, and display character. If you do, winning takes care of itself. -- Bear Bryant</p><iframe
sandbox="allow-forms allow-modals"></iframe>
<script>
var a = document.querySelector("p").classList;
console.log(a[2]); // c
a.toggle("d");
a.add("e","f");
a.replace("f","g");
a.remove("a");
a.forEach(v=>console.log(v)); // b c d e g
console.log(a.contains("a")); // false
console.log(document.querySelector("iframe").
sandbox.supports("allow-forms")); // true
</script></body></html>