V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
niuzhenzhao
V2EX  ›  问与答

求助 ajax post 访问 api 报 400 错误 百度一下说是参数不对

  •  
  •   niuzhenzhao · 2015-10-13 11:18:11 +08:00 · 1958 次点击
    这是一个创建于 3142 天前的主题,其中的信息可能已经有所发展或是发生改变。
    api:
    http://redsox.tcs.auckland.ac.nz/BC/Open/Service.svc/help/operations/RegisterUser

    <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script>
    function reg()
    {
    var Address = $("#address").val();
    var Name = $("#Name").val();
    var Password = $("#Password").val();

    $.ajax(
    {
    type: "post",
    contentType: "application/json",
    dataType: "json",
    url : "http://redsox.tcs.auckland.ac.nz/BC/Open/Service.svc/register",
    data:{
    "Address":Address,
    "Name":Name,
    "Password":Password
    },
    success: function(data)
    {
    alert(data);
    }
    });

    }
    </script>
    2 条回复    2015-10-14 17:58:53 +08:00
    niuzhenzhao
        1
    niuzhenzhao  
    OP
       2015-10-13 11:25:08 +08:00
    没人呢
    hronro
        2
    hronro  
       2015-10-14 17:58:53 +08:00
    跨域?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   982 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:39 · PVG 05:39 · LAX 14:39 · JFK 17:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.