how to get item by id in javascript code example Example: Finding HTML Element by Id var myElement = document.getElementById("intro");