Using Jquery to Change text on input field based on another text input field - Javascript jQuery

Javascript examples for jQuery:Form Text Input

Description

Using Jquery to Change text on input field based on another text input field

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
      <script>
$(document).ready(function(){
    $("#change").change(function(){
        $('#query').val($('#change').val() +" VVV") ;
    });// www  .j  a v a2  s  . c o m
});

      </script> 
   </head> 
   <body> 
      <input type="text" id="change" value="Test"> 
      <input type="text" id="query" value="Test AAA">  
   </body>
</html>

Related Tutorials