aptx_绝境长城 2022-07-04 16:01 采纳率: 75%
浏览 42
已结题

为啥ajax请求 的 url 是一个html?这个请求的数据是发送给谁了呢?

为啥ajax请求 的 url 是一个html?这个请求的数据是发送给谁了呢?


$.ajax({
        type:"post",
        async:false,   //这句代表的是同步和异步  true 是异步 false 是同步 ,当false时 执行完ajax 才执行后面的JS
        cache:false,
        data:{productId:productId,shopProductId:shopProId,bleanStr:bleanStr,supplyId:supplyId,supplyType:supplyType,deliverType:deliverType,
            priceretailonlines:priceretailonlines,areaIds:areaIds,areaLevels:areaLevels,stockNumber:sum,
            tempNumber:tempSum,isCheckChina:isCheckChina,areaNames:JSON.stringify(areaNames)},
        url:contextPath+'/frontseller/productRelease/directional/checkSave.html',
        dataType:"json",
        success : function(json) {
            if(json.alertStr != '' && json.alertStr != 'undefined'){
                 $.unblockUI();
                 alert_one(json.alertStr);
                 for(var i = 0; i < str2.length; i++){
                     str2[i].value="";        
                 } 
                return ;
             }else{
                 
                 
                 });
                 
                 document.getElementById("pbq").action=contextPath+"/frontseller/productRelease/directional/save.html";
                 document.getElementById("pbq").submit();
             }
        },
        error:function(request,text,error){
            alert_one(text);
        }
    }); 

  • 写回答

1条回答 默认 最新

  • 崽崽的谷雨 2022-07-04 17:30
    关注

    url 写啥 就发送给谁了呗 。ulr 是一个 。html ,正常,还可以是 .json,.txt应该就是 请求这个文件

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录

报告相同问题?

问题事件

  • 系统已结题 7月14日
  • 已采纳回答 7月6日
  • 创建了问题 7月4日

悬赏问题

  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法