search input html code example Example: get input from search bar Click to copydocument.getElementById("mySearch").value = "Favorite Cars";