JQuery+Ajax+Ashx+Base64 data无法传递的问题

 1 $.ajax({
 2                url:'/financepage/finance_public/ImgUpload.ashx',
 3                type:'POST',
 4                data:'Action=Base64Upload&Img='+content,
 5                //async:false,  //关闭异步
 6                dataType:'text',
 7                //contentType:"application/json; charset=utf-8",  //注释掉后就可以传递data了
 8                beforeSend:function(){f_alert2("waitting","图片正在上传中...");},
 9                error:function(XMLHttpRequest, textStatus, errorThrown){
10                     //alert(XMLHttpRequest+" , "+textStatus+" , "+errorThrown)
11                     f_alert2("closeWaitting","");
12                     f_alert2("error","上传过程中出现意外错误");
13                },
14                success:function(result){
15                     f_alert2("closeWaitting","");
16                     if(result=="false"||result==undefined||result=="none"||result==""){
17                         f_alert2("error","图片上传失败");
18                     }
19                     else{
20                         //alert(result);
21                         parent.parent.document.getElementById(GetURLParam("hiddName").value=result);
22                     }
23                }
24        });

 

你可能感兴趣的:(jquery)