<html>
<body>
<input type="search" id="mySearch">
<p>Click the button to disable the search field.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("mySearch").disabled = true;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_search_disabled by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:16:55 GMT -->
</html>