日期:2014-05-16 浏览次数:20767 次
function ajaxFileUpload() { $.ajaxFileUpload ( { url:'/ajax/upload.action', secureuri:false, fileElementId:'fileToUpload', dataType: 'json', success: function (data, status) { if(typeof(data.error) != 'undefined') { if(data.error != '') { alert(data.error); }else { alert(data.msg); } } }, error: function (data, status, e) { alert(e); } } ) return false; }
<action name="upload" class="..."> <param name="contentType" value="text/html"/> <result type="json"></result> </action>
<action name="upload" class="..."> <result type="json"> <param name="contentType" value="text/html"/> </result> </action>