$('#submit').on('click',function(){ var form= new FormData($('#n_form')[0]); $.ajax({ url: '/admin/notice/noticeadd', type: 'POST', data: form, processData:false, contentType:false, dataType: 'json', success: function (info) { console.log(info); }, error: function (data) { alert('ajax出错啦'); } }); })
使用ajax上传文件
猜你喜欢
转载自blog.csdn.net/weixin_39712497/article/details/80335143
今日推荐
周排行