使用 IE8、jQuery 1.6.1.min.js。
来自 REST 服务的 JSON 似乎是有效的(至少当我在 jsonlint.com 上验证它时)
{
"requestId":"1624517264",
"acknowledge":1,
"errorCode":0,
"totalResultCount":2,
"results":[
{"EmployeeCode":"007","EmployeeUno":7,"EmployeeName":"Bond, James","Location":"Unknown","Login":"JBOND"},
{"EmployeeCode":"008","EmployeeUno":8,"EmployeeName":"Bar, Foo","Location":"NYC","Login":"FBAR"}
]}
jQuery:
$.getJSON(urlToSvc + "&callback=?", function (data) {
// can't get to here
});
我收到一个 JavaScript 错误,预期为 ';'。我究竟做错了什么?