<script> $(document).ready(function() { $("#getMessage").on("click", function() {?? $.getJSON("/json/cats.json", function(json) { var html = ""; json.map(function(obj) { var keys = Object.keys(obj); html += "<div class = 'cat'>"; keys.map(function(key) { html += "<b>" + key + "</b>: " + obj[key] + "<br>"; }); html += "</div><br>"; }); ???? $(".message").html(html);?? }); }); });</script><div class="container-fluid"> <div class = "row text-center"> <h2>Cat Photo Finder</h2> </div> <div class = "row text-center"> <div class = "col-xs-12 well message"> The message will go here </div> </div> <div class = "row text-center"> <div class = "col-xs-12"> <button id = "getMessage" class = "btn btn-primary"> Get Message </button> </div> </div></div>
請(qǐng)問以下實(shí)例中對(duì)json數(shù)據(jù)處理的部分怎么理解?
動(dòng)漫人物
2018-12-28 15:13:01