$.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 的文章