title: Uncaught TypeError: FormData constructor: Argument 1 is not an object
body: <p>Hi I have a fetch request to my php script but an error occurs when I try to submit form data via html. How can I solve my problem? thank</p>
  <pre><code>const formdata = new FormData(document.querySelector(&quot;form&quot;));
  const submit = function(e) {
      e.preventDefault();
      fetch('script.php', {
          method: 'GET',
          body: formdata,
      })
          .then(ans =&gt; ans.text())
          .then(table =&gt; document.querySelector('#ans').innerHTML = table);
  };
  
  document.addEventListener('DOMContentLoaded', function(){
      document.querySelector('#submitButton').addEventListener('click', submit);
  });
  
  
  
  
  &lt;form id=&quot;form&quot; method=&quot;GET&quot;&gt;
      &lt;div class=&quot;inputX centered&quot;&gt;
          &lt;label for&gt;&lt;div&gt;X:&lt;/div&gt;&lt;/label&gt;
          &lt;div class=&quot;form_radio_group&quot;&gt;
              &lt;div class=&quot;form_radio_group-item&quot;&gt;
                  &lt;input id=&quot;radio-1&quot; type=&quot;radio&quot; name=&quot;x_set&quot; value=&quot;1&quot; checked&gt;
                  &lt;label for=&quot;radio-1&quot;&gt;1&lt;/label&gt;
  </code></pre>