Javascript examples for DOM HTML Element:Input URL
Input URL size Property - Display the width of a URL field (in number of characters):
<!DOCTYPE html> <html> <body> Homepage: <input type="url" id="myURL" size="30"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from www . j a va 2 s. c o m var x = document.getElementById("myURL").size; document.getElementById("demo").innerHTML = x; } </script> </body> </html>