javascript - The return object of the jquery.fileupload callback function does not have the return value of the ajax interface
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-07-05 11:02:06
0
2
919

Background: Using jquery.fileupload.js plug-in http://www.jq22.com/jquery-in...

When uploading files, under Firefox and Chrome, the return value can be obtained normally in the callback function done, as shown below

#The callback function code is as follows:

done: function (e, data) {
    console.info(data);        
},

However, in versions below IE10, in the returned data, the result is not an ajax result, but a jquery object, as shown below:

I still don’t understand the logic of the source code, please give me some advice

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(2)
大家讲道理
...
done: function ( e, data ) {
    var html;
    if(data.result[0].body) { 
        html = data.result[0].body.innerHTML; 
    } else {
        html = data.result;
    }
}
滿天的星座
var result = data.result[0].body ? data.result[0].body.innerHTML : data.result;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!