代码示例:(标识:jquery_ajax_getjson)
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
    $.getJSON("/index/demo/json_load.html",function(result){
      $.each(result, function(i, field){
        $("p").append(field + " ");
      });
    });
  });
});
</script>
</head>

<body>

<button>获得 JSON 数据</button>
<p></p>

</body>
</html>
运行结果: