ajax异步上传(没有form表单);单纯的提交文件

 <div class="input-group col-md-9 pull-left">
                   <input class="form-control" ng-file-select="onFileSelect($files)" enctype="multipart/form-data" accept=".txt,.csv" ng-disabled="uploading" type="file" name="userfile">
                    <span class="input-group-btn">
                        <button class="btn btn-primary" type="submit" onclick="upload(<?=!empty($info['id']) ? $info['id'] : ''?>)" ng-disabled="uploading" >上传</button>
                    </span>
                </div>

$.ajax({

         type: "GET",

         url: "test.json",

         data: {},//data中可以提交你想要提交过去的数据

         dataType: "json",

         success: function(data){
                  }
                        error : function(){
                                        alert("异步加载错误");
                                        }

可以使用H5的formdata对象添加文件内容,不过不兼容ie9-
html5 ajax上传文件asp.net示例

---------------------------------噗---------------------------------------

可以试一试Ajax同步请求

有很多种,比如
$.sumbitAjax({
type:GET,
action : url.action,
body : data,
dataType:"json",
success: function(data)
{

            }
             error : function()
            {

        }
});

https://www.daiwenhao.com/article-9.html 我是用的FileReader对象 上传时候把文件转换成了bese64上传的 后台处理 就ok了