title: jquery: can't get input value
body: <p>I'm trying send my value to ajax but it seems empty parameter.
  Then I try like:</p>
  
  <pre><code>&lt;input type="text" id="IDtag"/&gt;
  &lt;button id="check"&gt;&lt;/button&gt;
  
  $('#check').click(function(){
      var IDnum = $("#IDtag").val();
      alert (IDnum);
  });
  </code></pre>
  
  <p>alert is null even I already fill some value into <code>IDtag</code>.</p>
  
  <hr>
  
  <p>UPDATE
  <img src="https://i.stack.imgur.com/eEVDz.png" alt="after fill input"></p>