Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<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>
</html>