正解はquerySelector()です。document.querySelector(".class-name")のように使用し、最初に見つかった1つの要素を返します。すべて取得したい場合はquerySelectorAll()を使用します。