JQuery.getJSON() reading a local file

前端 未结 4 627
情话喂你
情话喂你 2020-12-11 18:30

How do you read a file in the current directory using JQuery.getJSON()?

I\'m trying something simple (with my data.json file in the same directory as my html file):<

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-11 19:14

    If you are using Google Chrome, it is intentional that AJAX on file:/// paths never works.

    crbug/40787

提交回复
热议问题