Javascript examples for DOM HTML Element:Textarea
Textarea placeholder Property - Get the placeholder text of a text area:
<!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea" placeholder="Your address.."> </textarea> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/* w w w . j av a2 s .c o m*/ var x = document.getElementById("myTextarea").placeholder; document.getElementById("demo").innerHTML = x; } </script> </body> </html>