【发布时间】:2017-02-04 22:10:12
【问题描述】:
我目前有一个包含三个文件的 Javascript 应用程序:
index.html
app.js
input.json
app.js 文件多次引用 input.json 文件,以便将内容呈现到 index.html 文件中的 div 中。
我想这样做,以便在 http://example.com/myapp 加载我的 index.html 可以将外部托管的 JSON 作为 app.js 读取的源,例如 myexample.com/myapp?myhost.com/files/input。 json.
任何人都可以告诉我如何让它工作吗?
【问题讨论】:
-
start here 获取
app.js中的查询字符串
标签: javascript jquery html json query-string