title: Disabling submit button until all fields have values
body: <p>I want to disable my submit button until all the fields have values..
  how can I do that?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;style type="text/css"&gt;
          &lt;/style&gt;
          &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#register').attr("disabled", true);
          });
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form&gt;
          Username&lt;br /&gt;
          &lt;input type="text" id="user_input" name="username" /&gt;&lt;br /&gt;
          Password&lt;br /&gt;
          &lt;input type="text" id="pass_input" name="password" /&gt;&lt;br /&gt;
          Confirm Password&lt;br /&gt;
          &lt;input type="text" id="v_pass_input" name="v_password" /&gt;&lt;br /&gt;
          Email&lt;br /&gt;
          &lt;input type="text" id="email" name="email" /&gt;&lt;br /&gt;     
          &lt;input type="submit" id="register" value="Register" /&gt;
          &lt;/form&gt;
          &lt;div id="test"&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>