- 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")
- // eval( "data = " + data );
- // data会被加<pre>导致AJAX不走success方法,改为如下形式
- // eval("data = \" "+data+" \" ");
- data = jQuery.parseJSON(data);
- // evaluate scripts within html
- if (type == "html")
- jQuery("<div>").html(data).find('script').remove();
- return data;
- },
spring-mvc使用ajaxFileUpload上传文件返回添加自动<per>处理
最新推荐文章于 2021-08-06 10:48:46 发布