get html by id javascript code example Example: get element by id html dom document.getElementById("demo");