Jquery Ajax模版
$.ajax({ type: "GET", url: "test.json", data: {username:'tt', content:'tt'}, dataType: "json", success: function(data){ var html = ''; $.each(data, function(commentIndex, comment){ html += '<div class="comment"><h6>' + comment['username'] + ':</h6><p class="para"' + comment['content'] + '</p></div>'; }); $('#resText').html(html); } });