码迷,mamicode.com
首页 > Web开发 > 详细

ajax请求接口

时间:2017-08-25 14:01:02      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:sign   .ajax   ons   content   json   html   $.ajax   app   detail   

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <script src="js/jquery-1.11.3.js" type="text/javascript" charset="utf-8"></script>
        
        <script type="text/javascript">
            $.ajax({
                type:"post",
                url:"http://192.168.0.63:81/api/activity/app/getActivityDetail?token=1&userId=1&sign=1", //填写接口地址
                contentType:‘application/json‘,
                data:JSON.stringify({
                    activityId:1
                }),
//                dataType: "json",    //可选项
                success: function(data){
                    console.log(data)
                }
            });
        </script>
    </body>

ajax请求接口

标签:sign   .ajax   ons   content   json   html   $.ajax   app   detail   

原文地址:http://www.cnblogs.com/slcs/p/7427196.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!