get element by id in javascript

JavaScript
document.getElementById("YourElementId"); document.getElementById("demo");

 
Source

Also in JavaScript: