14.1k 4 4 gold badges 34 34 silver badges 60 60 bronze badges. Add ID Attribute to the Image in JavaScript. There are 3 main ways to add and remove multiple classes: Using the classListmethod add or remove multiple classes. Remove class using classList.remove() method. To remove a class from multiple elements, use the `document.querySelectorAll` method to select the elements. Downloading Bootstraps Source File. ; Bootstrap scopes the :invalid and :valid styles to parent .was-validated class, usually applied to the