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