title: How to add onchange event on ajax?
body: <pre><code>&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
      $("#btn").click(function() {
          var val = "Hi";
          $.ajax ({
              url: "1.php?id",
              data: { id : val }
  
          });
      });
  });
  &lt;/script&gt;
  
  &lt;form name="numbers" id="numbers"&gt;
      &lt;input type="text" name="id" id="btn"&gt;
  &lt;input type="text"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This code is for click event but i want onchange event like on select option. Can anybody suggest me how to add onchange event on this ajax code? Thank you in advance.</p>