get element by id select code example Example: select element by id js var element = document.getElementById(id);