原文来自:https://www.cnblogs.com/dibaosong/p/4572274.html#top
文中给出了data.json文件内容
还给出了html文件内容
ok.
1.新建工程jQuery
2.创建文件夹html, 将data.json和json.html放进去
3.打开html,没问题,按钮正常出来了,点击没反应
4.F12
报了两个错,
一个是没引入jquery, 不识别$(function(){})
另一个是http://127.0.0.1:8020/jQuery/html/data.json 500 (Internal Server Error)
5.引入jquery.js文件, POST请求改为GET请求
点击正常了.
以下是代码和工程结构
====================================