Jquery File Upload Hidden IFrame

后端 未结 2 2050
一向
一向 2020-12-10 22:29

I needed a quick explanation on how to get an AJAX style file upload going using a hidden iframe. Here\'s the portion of the HTML code pertaining to the form:



        
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-10 23:14

    Well, I've used something like that:

    $("#upload_target")[0].contentWindow.document.body.innerHTML
    

    ... instead. But the general approach is similar: check this string, and if it's empty, just do nothing (i.e., return immediately). Otherwise proceed with analyzing this json.

提交回复
热议问题