Javascript examples for DOM HTML Element:Input Email field
Input Email size Property - Display the width of an email field (in number of characters):
<!DOCTYPE html> <html> <body> E-mail: <input type="email" id="myEmail" size="30"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from www.ja va2 s . c o m*/ var x = document.getElementById("myEmail").size; document.getElementById("demo").innerHTML = x; } </script> </body> </html>