zoukankan      html  css  js  c++  java
  • ajax小知识

    1.ajax发送get请求时,需要注意如下情况:

    var uri="http://127.0.0.1:8071/springmvcdemo/bigdataapi/publishdata";

    1)若URL不加“?”,则变成proxy+"http://127.0.0.1:8071/springmvcdemo/bigdataapi/publishdata"+"&udbPath=...&mapName=.....";即将uri当作一个参数

    2)加上“?”,则将url看做一个完整的路径

    也可以在拼接地址时直接加上参数,如url = proxy + "http://127.0.0.1:8010/style.set?layer=" + layerName + "&backColor=" + backColor + "&item=" + itemVal;

    var proxy="/webframe/biz/httpproxy/httpproxy.jsp?url=";
    var url=proxy+"http://127.0.0.1:8071/springmvcdemo/bigdataapi/publishdata?";
                $.ajax({
                    url:url,
                    type:"GET",
                    data:{udbPath:udbPath,
                        mapName:mapName,
                        hdfsPath:hdfsPath
                    },
                    dataType:"text",
                    success:function(data){
                        //$(".stateInfo").html("");
                        //statecontainer="<span >发布完成,本次发布总共耗时60秒。</span>";
                        //$("#publishResultInfo").append(statecontainer);
                    },
                    error:function(x,e){
                        layer.alert("err");
                    }
                })
  • 相关阅读:
    admob 广告增加
    流量统计
    施乐 著名的帕洛阿尔托研究中心
    android Launcher
    系统集成
    jad 批量反编译class文件
    eclipse classes 文件不见
    悬浮窗不可触摸
    ios 相关
    android 屏幕切换
  • 原文地址:https://www.cnblogs.com/jiktiv123/p/7687184.html
Copyright © 2011-2022 走看看