get class from id document js code example Example: javascript get element using id and class name document.querySelector('#id-goes-here .class-goes-here');