have a placeholder text for every new line of Textarea - Javascript jQuery

Javascript examples for jQuery:Form Textarea

Description

have a placeholder text for every new line of Textarea

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
   </head> 
   <body> 
      <textarea></textarea> 
      <script type="text/javascript">
$('textarea').prop('placeholder','Enter\n|Your Text');

      </script>  
   </body>//from   w ww  . j  a  va2 s  .  co  m
</html>

Related Tutorials