Javascript examples for DOM HTML Element:Input URL
Input URL readOnly Property - Find out if a URL field is read-only or not:
<!DOCTYPE html> <html> <body> Homepage: <input type="url" id="myURL" readonly> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/* w w w . j av a 2 s.c om*/ var x = document.getElementById("myURL").readOnly; document.getElementById("demo").innerHTML = x; } </script> </body> </html>