Skip to content

Glossary: JavaScript in the Browser

innerHTML

A property that reads and writes an element's contents as HTML. Setting it with text you didn't write lets attackers inject code, so use textContent instead.

Where the book teaches it

Related terms

textContentXSS (cross-site scripting)