繁体   English   中英

jQuery ajax 不通过手机浏览器提交数据。请解决这个问题

[英]jQuery ajax does not submit data via mobile browsers.Please Solve this problem

我使用以下代码将表单数据提交到数据库。 在桌面上使用 chrome 时,这一切都很好。 但是当我尝试通过 safari 或 chrome mobile 传递数据时,有时会成功添加或编辑数据,但并非总是如此。 可能是什么问题呢? 脚本如下所示。

function call(fd,src_cd){
         alert("cme call  "+fd+","+src_cd);
         $http({
             method: 'POST',
              url: "./PSF00003/updateImage.app",
              contentType: "application/json; charset=utf-8",
              cache: false,
              async:true,
              data: fd,
             /*processData: false,*/
              enctype:'multipart/form-data',
              transformRequest: angular.identity,
              headers: { 'Content-Type': undefined},
              timeout: 300000,
             }).success(function(data) {
                 alert("ajax request come"+data);
                Flash.create('info', 'Update Success Fully ', 'large-text');
                indexedDBDataSvc.open().then(function() {
                  indexedDBDataSvc.deleteDataDynamic(src_cd,"pwa_water_census_src");

                 });
                init();
            }).error(function(response){ 
                alert(response);
                 console.dir(response);
                 Flash.create('danger','There is a  Problem.Contact With Administrator'+response, 'large-text');

         });
    }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM