How to set the content of a textarea using jQuery?

jQueryWeb DevelopmentFront End Technology

On clicking the <a> tag,the content is dispaying inside the textarea.

Example

 Live Demo

<script type="text/javascript">
   $(document).ready(function () {
      $("a").click(function () {
         $("#txt1").val("I AM DISPLAYING IN THE TEXTAREA");
      });
   });
   </script>
<body>
<div>
<a id="quiresweb" class="webclass" href="#">Quires</a><br />
<label id="lbl">TEXTAREA ::</label>
<textarea id="txt1" rows="5" cols="20"></textarea><br />
</div>
</body>
raja
Published on 01-Oct-2018 08:12:09
Advertisements