Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. I check, compile and run every program. Contact me at: aviboots(AT)netvision.net.il
Hostgator 1 Penny

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


6,846 questions

9,748 answers

573 users

How to hide and show placeholder on textarea when click and leave in HTML5 & Javascript

1 Answer

0 votes
<script>
function onfocusPost() 
{
   document.getElementById("new-post").placeholder = "";
}            
function onblurPost() 
{
   document.getElementById("new-post").placeholder = "Add New Post";
}
</script>
<textarea aria-label="New Post" id="new-post" title="New Post" placeholder="Add New Post" 
role="textbox" aria-autocomplete="list" autocomplete="off" aria-expanded="false" style="display: block;" 
cols="80" style="width: 400px; height: 150px;" 
onfocus="onfocusPost();" onblur="onblurPost();"></textarea>



answered May 3, 2014 by avibootz
edited May 3, 2014 by avibootz
...