javascript - 请问,ajaxfileupload.js 在IE上传文件上传文件成功后执行error
阿神
阿神 2017-04-10 16:00:47
0
1
445

用ajaxfileupload.js 在IE上,上传文件执行如下函数

 uploadHttpData: function( r, type ) {
        var data = !type;
        data = type == "xml" || data ? r.responseXML : r.responseText;
        // If the type is "script", eval it in global context
        if ( type == "script" )
            jQuery.globalEval( data );
        // Get the JavaScript object, if JSON is used.
        if ( type == "json" )
            data = r.responseText;  
            if(data.indexOf('</pre>') != -1){
                data = data.substring(data.indexOf('>')+1, data.length-6);
            }
#            eval( "data = " + data);//出现异常,为什么?
        if ( type == "html" )
            jQuery("<p>").html(data).evalScripts();
        return data;
    }
阿神
阿神

闭关修行中......

reply all(1)
黄舟

问题已找到,从后台传到前端的数据 中文编码问题!

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!