亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

How to upload php images and forms together with ajax?
PHP中文網(wǎng)
PHP中文網(wǎng) 2017-06-23 09:11:57
0
4
1016

Is the image and form uploaded together through ajax? I don’t know how to upload them together? I uploaded the image separately using formdata, but I don’t know how to associate it with the form submission?

PHP中文網(wǎng)
PHP中文網(wǎng)

認(rèn)證高級(jí)PHP講師

reply all(4)
僅有的幸福

Written by myself

過(guò)去多啦不再A夢(mèng)
var blob = new Blob([this.response], { type: " text/plain" });
            var xhr1 = new XMLHttpRequest();
            xhr1.open("POST", url, true);
            xhr1.onreadystatechange = function (e) {
                
            };
            var formData = new FormData();
            formData.append("File", blob, fileName);
            formData.append("MarketPlace", "");
            formData.append("SignInEmail", "");
            formData.append("RequestDate","");
            xhr1.send(formData);
習(xí)慣沉默

https://developer.mozilla.org...

Ty80

I also thought about it (unfortunately not) and looked at the picture on Baidu (this is for java but the idea is the same, which is to use ajax to do the submit operation of the form. In this way, in the background or get a $ _FILE global variable. . I won’t post the details) (The original link is below)

http://blog.csdn.net/dsl81572...

Hope it helps you. Thank you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template