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