jquery-ajax
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
? $("button").click(function(){
? ? $.getJSON("/example/jquery/demo_ajax_json.js",function(result){
? ? ? $.each(result, function(index, value){
? ? ? ? $("p").append(value +' ');
? ? ? });
? ? });
? });
});
</script>
</head>
<body>
<button>獲得 JSON 數(shù)據(jù)</button>
<p></p>
</body>
</html>
2018-04-26
好像是對(duì)的