title: Send POST data using XMLHttpRequest
body: <p>I'd like to send some data using an XMLHttpRequest in JavaScript.</p>
  <p>Say I have the following form in HTML:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;form name=&quot;inputform&quot; action=&quot;somewhere&quot; method=&quot;post&quot;&gt;
    &lt;input type=&quot;hidden&quot; value=&quot;person&quot; name=&quot;user&quot;&gt;
    &lt;input type=&quot;hidden&quot; value=&quot;password&quot; name=&quot;pwd&quot;&gt;
    &lt;input type=&quot;hidden&quot; value=&quot;place&quot; name=&quot;organization&quot;&gt;
    &lt;input type=&quot;hidden&quot; value=&quot;key&quot; name=&quot;requiredkey&quot;&gt;
  &lt;/form&gt;
  </code></pre>
  <p>How can I write the equivalent using an XMLHttpRequest in JavaScript?</p>