我有以下幾點:如何動態地訪問一個JSON鍵與jQuery
var parsed_contacts = jQuery.parseJSON(conts);
$('#contacts > li > a').click(function(event){
target_id = event.target.id; //yields a Google App Engine entity key bound to a <a> id property. (e.g "agdldHJlYnVncg0LEgdDb250YWN0GFgM", with quotes)
console.log(parsed_contacts[target_id]); //Yields undefined
});
而且這裏是我從console.log(parsed_contacts)
得到:
我應該如何進行? 在此先感謝!
哈,這就是它!謝謝! :d – 2010-12-17 05:42:53
不客氣:) – elo80ka 2010-12-17 05:47:06