weixin_33725239 2017-03-11 19:06 采纳率: 0%
浏览 30

无法使用AJAX显示JSON

I have a JSON file, with many data inside. And I want to display this with AJAX, so I tried to make this but doesn't work and after much search on internet I call your help :

    $(document).ready(function () {
        $.getJSON("data/liste_des_sites_des_hotspots_paris_wifi.json").done(function(){

            function donnee (data) {
                console.log(data)
            }


    })

</div>
  • 写回答

3条回答 默认 最新

  • ?yb? 2017-03-11 19:08
    关注

     $(document).ready(function () {
            $.getJSON("yourlocation").done(function(){
    
                console.log(data);
    
    
        });
        });
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

    Your syntax is bad/wrong.

    </div>
    
    评论

报告相同问题?