'placeholder to textarea inside a JSP page
I am trying to use the plcaeholder attribute inside a <textarea> tag of a jsp page.
<textarea rows="13" cols="94" id="message" name="txtAreaName" style="vertical-align: onclick="textAreaPlaceholding()">Enter the message here...</textarea>
But it shows that placeholder="some_text_content" is not a valid attribute(Undefined attribute name (placeholder)). What can be the problem? Am I using any wrong attribute inside the <textarea> tag or anything else like I follow a wrong syntax.
As it don't work, for now I displayed a text content which will go invisible when user clicks the textarea and/or when the textarea is edited; with the help of a javascript method which you can find in the above code as 'onclick="textAreaPlaceholding()"'. But I need to know the exact problem and solution.
Thanks in advance for your responses.!
Solution 1:[1]
try this
<textarea placeholder="Enter the message here...">
</textarea>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ganesh Rengarajan |
