src of button document get element by id code example Example: get document by id var element = document.getElementById(id);