I use .getJSON() to extract information from Wikipedia, using the MediaWiki API. I don't know how to handle the data I get. For example, how can I display the text content? I've tried using .text() below, but I'm a little clueless.
var title="jQuery";
$.getJSON("http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=cont开发者_StackOverflowent&titles="+title+"&format=json&callback=?",
        function(data){
            data.text();
        });
    });
you can use http://api.jquery.com/jQuery.parseJSON/ for parsing the JSON data. But seems your above url will give you incorrect json structure, try use this instead : "http://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&titles="+title+"&format=json"
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论