Skip to content

Glossary: JavaScript Basics

document.querySelector

Also written: querySelector, document

A browser function that finds an element on the page using a selector such as `"#message"`, so a script can read or change it.

Where the book teaches it

Related terms

textContentHTMLEvent