Javascript examples for DOM HTML Element:Input Password
Input Password placeholder Property - Get the placeholder text of a password field:
<!DOCTYPE html> <html> <body> Password: <input type="password" id="myPsw" placeholder="Your password"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*w w w.java2 s . c om*/ var x = document.getElementById("myPsw").placeholder; document.getElementById("demo").innerHTML = x; } </script> </body> </html>