2013-02-07 22 views

回答

3

您可以使用jQuery来获取数据并解析其槽

$.get("http://ws.audioscrobbler.com/2.0/user/bbc6music/weeklytrackchart.xml", 
function(xmlData){ 
    var $page = $(xmlData); 
    //you can now use all the jQuery to conquer the world 
    $page.find("track:lt(20)").each(function(){ 
      var $data = $(this); 
      var artistName = $data.find("artist").text(); 
      //mischief goes here 
     }); 
     //tap the map and say "mischief managed" 
} 
); 

http://jquery.com/

+0

完美,欢呼奥斯汀! –