Javascript examples for DOM HTML Element:Input URL
Input URL placeholder Property - Get the placeholder text of a URL field:
<!DOCTYPE html> <html> <body> Homepage: <input type="url" id="myURL" placeholder="Address of web site"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//w w w .j av a2s .c o m var x = document.getElementById("myURL").placeholder; document.getElementById("demo").innerHTML = x; } </script> </body> </html>