input field for search barhtml code example Example: get input from search bar document.getElementById("mySearch").value = "Favorite Cars";