Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
Search: <input type="search" id="mySearch" value="Food">
<p>Click the button to change the value of the value attribute of the search field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("mySearch").value = "Muscle Cars";
}
</script>
</body>
</html>