- getElementById
- innerHTML
Inject content in HTML
examples/dom/inject_content.html
<div id="display"></div> <script src="inject_content.js"></script>
examples/dom/inject_content.js
"use strict"; document.getElementById('display').innerHTML = 'Hello World';