Handle textarea change and key up event - Javascript jQuery

Javascript examples for jQuery:Form Textarea

Description

Handle textarea change and key up event

Demo Code

ResultView the demo in separate window


<html>
   <head> 
      <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> 
   </head> 
   <body> 
      <textarea></textarea> 
      <script>
$('textarea').on('change', function(e) {
  console.log($(this).val());
});//w  w w  .j a va  2s  .c  o m
$('textarea').on('keyup', function(e) {
  console.log($(this).val());
});

      </script>  
   </body>
</html>

Related Tutorials