ajax请求

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title></title>
        <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.js"></script>
    </head>
    <body>
        <button type="button">点击</button>
        <script>
            $("button").click(function() {

                $.ajax({
                    //请求类型,get,post
                    type: 'GET',
                    url: "http://sys.meexing.com/api/rss/table/list/about?rsswhere=%7B%22id%22%3A%221%22%7D&signtoken=730c14bb76cc321757572c7d6e52ad10",
                    // 请求的数据类型,可以是html,json,xml等
                    dataType: 'json',
                    //传输的数据
                    
                    //选择是否支持异步刷新,默认为true
                    async: true,
                    success: function(data) {
                        console.log(data);
                    },
                    error: function() {
                        console.log('对不起,请求失败');
                    }
                })
            })
        </script>
    </body>
</html>

<script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.js"></script>

posted @ 2018-10-22 20:05  我爱大西瓜  阅读(137)  评论(0编辑  收藏  举报