Get the placeholder text of a text area:
var x = document.getElementById("myTextarea").placeholder;
Click the button to display the placeholder text of the 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 ww .ja v a 2 s . com var x = document.getElementById("myTextarea").placeholder; document.getElementById("demo").innerHTML = x; } </script> </body> </html>