title: how to read form data using javascript?
body: <p>This is the form data.</p>
  
  <pre><code>&lt;div&gt;
      &lt;form name="payform" action="pay.html" method="POST"&gt;
          &lt;div&gt;
              &lt;input id="customerName" name="firstname" ng-model="customerName" style="display:none"/&gt;
              &lt;input style="display:none" id="txnid" name="txnid" ng-model="transactionid" /&gt;
              &lt;input type="submit" name="paybutton" id="payit" /&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When i submit data the contents are posted to <strong>pay.html</strong>. How can I read those data using javascript on <strong>pay.html</strong> page?</p>