title: how to check if input field is empty
body: <p>I'm making a form with inputs, if the input type is empty then the button submit is disabled but, if the input fields is with length > 0 the submit button is enabled</p>
  
  <pre><code>&lt;input type='text' id='spa' onkeyup='check()'&gt;&lt;br&gt;
  &lt;input type='text' id='eng' onkeyup='check()'&gt;&lt;br&gt;
  &lt;input type='button' id='submit' disabled&gt;
  
  function check() {
    if($("#spa").lenght&gt;0 &amp;&amp; $("#eng").lenght&gt;0) {
      $("#submit").prop('disabled', false);
    } else {
      $("#submit").prop('disabled', true);
    }
  }
  </code></pre>
  
  <p>it works but if then I delete for example the content of input spa the button submit is still enabled</p>