POST a form with Jquery AJAX When input is a File

后端 未结 2 1427
心在旅途
心在旅途 2021-02-09 06:17

I have several areas where I use AJAX to submit text fields.

 var name = $(\"input#name\").val(); 

   $.ajax({  
      type: \"POST\",  
      url: \"bin/proces         


        
2条回答
  •  时光取名叫无心
    2021-02-09 06:37

    By default, jQuery cannot POST a form via AJAX if it contains a upload field.

    You can try this plugin: http://jquery.malsup.com/form/

提交回复
热议问题