首页 > 请问,ajaxfileupload.js 在IE上传文件上传文件成功后执行error

请问,ajaxfileupload.js 在IE上传文件上传文件成功后执行error

用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("<div>").html(data).evalScripts();
        return data;
    }

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


提供一下你的 data 变量的值是多少?

【热门文章】
【热门文章】