It’s actually very similar to jQuery:
document.getElementsByClassName('class1 class2')
More Related Contents:
- How do I create an HTML element with attributes and events using JavaScript?
- Deleting array elements in JavaScript – delete vs splice
- How may I reference the script tag that loaded the currently-executing script?
- Private properties in JavaScript ES6 classes
- ES6 modules: Export single class of static methods OR multiple individual methods
- How to getElementByClass instead of GetElementById with JavaScript?
- javascript document.getElementsByClassName compatibility with IE
- Call static methods from regular ES6 class methods
- JavaScript – Owner of “this”
- Angularjs – ng-cloak/ng-show elements blink
- GetElementByID – Multiple IDs
- Is it possible to redefine a JavaScript class’s method?
- Add onclick event to newly added element in JavaScript
- Why duck typing is allowed for classes in TypeScript
- ES6 classes : what about instrospection?
- No ways to have class-based objects in javascript?
- “This” within es6 class method [duplicate]
- jQuery: Finding partial class name [duplicate]
- jQuery counting elements by class – what is the best way to implement this?
- Getting DOM element value using pure JavaScript
- Get the string representation of a DOM node
- Get all instances of class in Javascript
- Does JavaScript have classes?
- How to appendChild(element) many times. (The same element)
- How to set DOM element as first child?
- Class methods as event handlers in JavaScript?
- What are getters and setters for in ECMAScript 6 classes?
- Can I use document.getElementById() with multiple ids?
- Why aren’t methods of an object created with class bound to it in ES6?
- JavaScript getting an elements class without any libraries