Javascript examples for DOM HTML Element:Input Email field
Input Email placeholder Property - Get the placeholder text of an email field:
<!DOCTYPE html> <html> <body> Login: <input type="email" id="myEmail" placeholder="Email"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w ww . ja v a2 s . c o m var x = document.getElementById("myEmail").placeholder; document.getElementById("demo").innerHTML = x; } </script> </body> </html>