我的 JS 和 HTML 位于 JS Fiddle,这里。我已经将 JSON 对象放在 CSS 的位置,因为我没有任何 CSS,所以我认为它不会导致问题。问题是我无法让它工作......我认为我的ajaxCall
函数中某处有错误,但我找不到它。错误消息说
GET ....[HTTP/1.1 304 未修改 12ms]
我正在使用 Wamp 在我的本地网络服务器上尝试此操作。
JSON文件:
{
"adrBook": [
{
"name": "Nikola Markovic",
"email": "nikola@gmail.com",
"location": "Serbia"
},
{
"name": "Petar Nikolic",
"email": "petar@gmail.com",
"location": "Germany"
}
{
"name": "Marko Stojanovic",
"email": "markos@gmail.com",
"location": "Swedish"
},
{
"name": "Dusan Uzelac",
"email": "dusanu@gmail.com",
"location": "Holand"
},
{
"name": "Petar Grujic",
"email": "petarg@gmail.com",
"location": "USA"
},
{
"name": "Nikola Jesic",
"email": "nikolaj@gmail.com",
"location": "China"
},
{
"name": "John Man",
"email": "johnm@gmail.com",
"location": "Japan"
},
{
"name": "Jeniffer Gray",
"email": "jenifferg@gmail.com",
"location": "Bosnia"
},
{
"name": "Marc Brown",
"email": "marcb@gmail.com",
"location": "Croatia"
},
{
"name": "Nikola Ilic",
"email": "nikolai@gmail.com",
"location": "Macedonia"
},
{
"name": "Nemanja Nikolic",
"email": "nemanjan@gmail.com",
"location": "Slovenia"
},
{
"name": "Stefan Nikolic",
"email": "stefann@gmail.com",
"location": "Romania"
}
]
}