How to upload files using jQuery's ajax function with PHP?

后端 未结 3 1928
长发绾君心
长发绾君心 2021-01-27 16:00

Here\'s my nonworking attempt:



        
相关标签:
3条回答
  • 2021-01-27 16:08

    Actually, HTML5 and the new File API does support uploading via XmlHttpRequest. It works beautifully in Firefox 4 and Chrome.

    0 讨论(0)
  • 2021-01-27 16:10

    XmlHttpRequest has no support to upload files. you need to use some hidden iframe or a flash solution.

    0 讨论(0)
  • 2021-01-27 16:23

    You can not upload file using plain JS/AJAX. A known trick is to post your file to a hidden iframe and update the iframe.

    0 讨论(0)
提交回复
热议问题