ajaxfileupload回到json带<pre>

来源:互联网 发布:免费下载图片软件 编辑:程序博客网 时间:2024/04/29 17:30
 uploadHttpData: function( r, type ) {        var data = !type;        data = type == "xml" || data ? r.responseXML : r.responseText;        // ifthe type is "script", eval it in global context        if( type == "script" ){         jQuery.globalEval( data );        }        // Get the JavaScript object, ifJSON is used.        if( type == "json" ){        data = jQuery.parseJSON(jQuery(data).text());         //eval( "data = " + data );        }        // evaluate scripts within html        if( type == "html" ){         jQuery("<div>").html(data).evalScripts();        }        return data;    }
0 0
原创粉丝点击