title: jquery post a file form, but server get nothing?
body: <p>i have a page need to click a button to post a file, but the server get nothing??? can anyone help me?</p>
  
  <pre><code>&lt;button class="btn btn-primary btn-sm" id="upload_item"&gt;上传&lt;/button&gt;
  
  $('#upload_item').click(function(event) {
    event.preventDefault();
    var form = $('&lt;form action="." method="post" enctype="multipart/form-data" hidden&gt; &lt;/form&gt;').wrapInner(
      $('&lt;input type="file" value="" name="uploadfile"&gt;').click()).appendTo('body').submit().remove();
  });
  </code></pre>