Parse JSON from URL

后端 未结 3 1748
伪装坚强ぢ
伪装坚强ぢ 2021-02-10 04:46

I am building a web site and I use a url which returns a JSON response, like:

{name:mark; status:ok}

I would like to obtain the name, using onl

3条回答
  •  無奈伤痛
    2021-02-10 04:54

       $(document).ready(function () {
        var url = 'https://graph.facebook.com/me';
        $.getJSON(url, function (data) {
            alert(data.name);
        });
    }); 
    

提交回复
热议问题