<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>
<!-- Mirrored from www.mdssup.ma/jsref/tryit.asp?filename=tryjsref_search_value by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:53:06 GMT -->
</html>