specify which html file to get id value from code example Example: get element by id in javascript document.getElementById("YourElementId");