title: Loop throught form inputs
body: <p>I have a form with lots of inputs. I want to get each id and value and then put them in $.load method. I tried this:</p>
  
  <pre><code>$("#form input").each(function() {
      var name = $(this).attr("id");
      var value = $(this).attr("value");
      $.extend(params, {
          name, value
      });
  });
  </code></pre>
  
  <p>and then use <code>$.load("script.php", params);</code></p>
  
  <p>But obviously it doesn't work. In params I have only one element "name". And I'm not sure I should use extend method too.</p>