这样:
[code="json"][
{
"text" : "王家湾",
"value" : "9"
},
{
"text" : "李家湾",
"value" : "10"
},
{
"text" : "邵家湾",
"value" : "13"
}
][/code]
[code="html"]
$(document).ready(function(){
$("#letter-e .button").click(function(){
$.getJSON("e.json",function(data){
$("#dictionary").empty();
$.each(data,function(entryIndex,entry){
var html = '<div class="entry">';
html += '<div class="text">' + entry['text'] + '</div>';
html += '<div class="value">' + entry['value'] + '</div>';
html += '</div>';
$('#dictionary').append(html);
});
});
});
});
[/code]