Javascript examples for DOM HTML Element:Input Search
Input Search disabled Property - Disable and enable a search field:
<!DOCTYPE html> <html> <body> Search: <input type="search" id="mySearch"><br><br> <button onclick="disableBtn()">Disable Search Field</button> <button onclick="enableBtn()">Enable Search Field</button> <script> function disableBtn() {//from w ww.j a v a2 s . c om document.getElementById("mySearch").disabled = true; } function enableBtn() { document.getElementById("mySearch").disabled = false; } </script> </body> </html>