how to define get element by id in javascript code example
Example 1: js how to find element using id
element = document.querySelector("#id");
Example 2: how to get element by id
document.getElementById("demo");
element = document.querySelector("#id");
document.getElementById("demo");