Alert immediately after text field get a value - Javascript jQuery

Javascript examples for jQuery:Text

Description

Alert immediately after text field get a value

Demo Code

ResultView the demo in separate window


<html>
 <head> 
  <script src="https://code.jquery.com/jquery-2.0.3.min.js"></script> 
 </head> //from   w  w w.  j  a  va2 s. co m
 <body> 
  <input type="text" id="a" onchange="console.log('a')"> 
  <input type="button" id="my-button"> 
  <script>
$('#my-button').click(function() {
  $('#a').val('a').change();
});

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

Related Tutorials