ajax提交Form表单带文件

 $.ajax({
            'type' : 'POST',
            'url' : '',
            'dateType' : 'json',
            'data' : new FormData($('#FormId')[0]),
            'async':false,
            'contentType': false,
            'processData': false,
            'success' : function(res){

            },  
            error: function(XMLHttpRequest, textStatus, errorThrown){ 
                FormatError('PageError0420',XMLHttpRequest.responseText,textStatus,errorThrown);
                alert('服务器异常');
            }
        })

 

posted @ 2021-12-22 16:18  变形金刚之猩猩将军  阅读(85)  评论(0)    收藏  举报