Javascript 如何在引导面板中使用ajax通过JQuery显示Json数据?
我试图从json文件中获取信息,该文件的结构如下:Javascript 如何在引导面板中使用ajax通过JQuery显示Json数据?,javascript,jquery,json,ajax,twitter-bootstrap,Javascript,Jquery,Json,Ajax,Twitter Bootstrap,我试图从json文件中获取信息,该文件的结构如下: { "title": "title", "subtitle": "Select2", "category": "C#", "desc": "this is a description", "text":"this is some text", "keywords": [ "select", "autocomplete", "typeahead", "dropdown", "multiselect",
{
"title": "title",
"subtitle": "Select2",
"category": "C#",
"desc": "this is a description",
"text":"this is some text",
"keywords": [
"select",
"autocomplete",
"typeahead",
"dropdown",
"multiselect",
"tag",
"tagging"
],
"images": [
"path1",
"path2",
"path3"
],
"author": {
"name": "zh",
"url": "someURL"
}
}
获取Json文件没有问题,但是使用Json文件的数据呈现面板不起作用。
怎么了
我的代码不起作用:
请参见我的在线文章:rocketunit.ch/codesippet.html欢迎使用堆栈溢出!你可以选择第一个,学习一个好的问题,然后创造一个新的答案。这使我们更容易帮助您。您从服务器得到了什么响应?@Justinas post-edited以联机查看示例。如果json有效,请首先控制台json,然后根据我的建议使用$.each进行迭代。