Javascript examples for DOM HTML Element:Input URL
Input URL disabled Property - Disable and enable a URL field:
<!DOCTYPE html> <html> <body> Homepage: <input type="url" id="myURL"><br><br> <button onclick="disableBtn()">Disable URL Field</button> <button onclick="enableBtn()">Enable URL Field</button> <script> function disableBtn() {//from w w w. jav a2 s. c o m document.getElementById("myURL").disabled = true; } function enableBtn() { document.getElementById("myURL").disabled = false; } </script> </body> </html>