title: Create, append and submit form using pure JavaScript
body: <p>I'm trying to implement onclick function, which send parameters using POST method. I need this function to reload the page, what makes me to use some other way than AJAX. I have a function to do this, but this function uses jQuery. Now I need to "port it" to pure JavaScript.</p>
  
  <p>jQuery function:</p>
  
  <pre><code>function domainRemoveConfirmation(id, url) {
      //trick to send javascript redirect with post data
      var form = $('&lt;form action="' + url + '" method="post" hidden="true"&gt;' +
                '&lt;input type="text" name="domainId" value="'+ id + '" /&gt;' +
                '&lt;/form&gt;');
      $('body').append(form);
      $(form).submit();
  }
  </code></pre>
  
  <p>I look for the equivalent function in pure JavaScript, I need to create element (form with input fields), append it and submit it.</p>
  
  <p>Thanks in advance!</p>