$.ajaxfiledUpload({
dataType:"json"
其他省略。。。
success:function(data){
alert(data.result);
}
});
3.后台
public String upload(){
其他省略。。。
response.setContentType( " text/plain;charset='utf-8'" );
response.getWriter().wirite( 对象转换后的 json 字符串 );
response.getWriter().flush();
}
閱讀更多 碼農筆記Day 的文章
關鍵字: jQuery 技术 JavaScript