$(document).ready(function() {
$("#a").click(function() {
$.getJSON('b.json', function(data) {
$.each(data, function(entryIndex, entry) {
var html = "<div class='entry'>";
html += "<h3 class='term'>" + entry['term'] + "</h3>";
html += "<div class='part'>" + entry['part'] + "</div>";
html += "<div class='definition'>";
html += entry['definition'];
html += "</div>";
html += "</div>";
$("#b").append(html);
});
});
});
});
联系客服