POST a form with Jquery AJAX When input is a File

后端 未结 2 878
你的背包
你的背包 2021-02-09 06:21

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:30

    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/

提交回复
热议问题