Ajax - 未捕获的SyntaxError

时间:2016-12-30 15:19:48

标签: javascript jquery ajax

我遇到了ajax错误:

"Uncaught SyntaxError: Unexpected token :"

我的Javascript是:

$(document).ready(function(e) {
$.get("http://agenda.myvnc.com:8895/datasnap/rest/TsrvServerMetodos/ag_get_convJson", null, function(result){
        $.each(result, function(i, field){
            $("div").append(field + " ");
        });
     },"jsonp");
});

网址的结果是:

{"result":[[{"indice":1002,"nome":"ABET"},{"indice":75,"nome":"ALLIANZ"},{"indice":1013,"nome":"AMAFRERJ"},{"indice":127,"nome":"AMBEP"},{"indice":1012,"nome":"AMIL"},{"indice":185,"nome":"AMIL POR ADMINISTRA\u00C7\u00C3O"},{"indice":1007,"nome":"ASES"},{"indice":108,"nome":"ASSEFAZ"},{"indice":1015,"nome":"ASSIM"},{"indice":1025,"nome":"ASSIM PREFEITURA"},{"indice":197,"nome":"BNDES-FAPES"},{"indice":31,"nome":"BRADESCO (B)"},{"indice":148,"nome":"BRASIL  ASSIST\u00CANCIA"},{"indice":9,"nome":"CABERJ ( B)"},{"indice":141,"nome":"CARE PLUS"},{"indice":1014,"nome":"CASSI"},{"indice":194,"nome":"CAURJ"},{"indice":12,"nome":"CNEN ( R)"},{"indice":1016,"nome":"COLIGA\u00C7\u00C3O POLICIA"},{"indice":1003,"nome":"CONMEDH"},{"indice":140,"nome":"CORREIOS"},{"indice":1018,"nome":"DIX"},{"indice":93,"nome":"ELETRONUCLEAR ( R)"},{"indice":16,"nome":"EMBRATEL ( B)"},{"indice":1004,"nome":"FUNCEF"},{"indice":18,"nome":"FURNAS"},{"indice":1010,"nome":"GAMA ESCOLAR"},{"indice":207,"nome":"GAMA SAUDE"},{"indice":21,"nome":"GOLDEN CROSS ( B)"},{"indice":1005,"nome":"HOSPITAL DO ROCHA"},{"indice":129,"nome":"INB (P)"},{"indice":1006,"nome":"INTEGRAL S\u00C1UDE"},{"indice":1008,"nome":"INTERM\u00C9DICA"},{"indice":24,"nome":"IRB"},{"indice":213,"nome":"LIFE EMPRESARIAL"},{"indice":201,"nome":"MAYER SISTEMA DE SAUDE"},{"indice":149,"nome":"MEDIAL SA\u00DADE ( R)"},{"indice":25,"nome":"MEDISERVICE ( B)"},{"indice":74,"nome":"MUTUA ( R)"},{"indice":187,"nome":"N\u00DACLEOS"},{"indice":67,"nome":"NUCLEP (R)"},{"indice":26,"nome":"PARTICULAR"},{"indice":27,"nome":"PETROBRAS PETRO ( B)"},{"indice":28,"nome":"PETROBRAS\\ DISTR ( R)"},{"indice":103,"nome":"PORTO SEGURO ( R)"},{"indice":193,"nome":"REAL GRANDEZA"},{"indice":175,"nome":"SALUTAR SA\u00DADE"},{"indice":32,"nome":"SEGURO CANADA ( B)"},{"indice":1011,"nome":"SIND SA\u00DADE"},{"indice":122,"nome":"SOCIOS COTISTAS"},{"indice":35,"nome":"SUL AMERICA ( B)"},{"indice":1,"nome":"Tabelas Originais"},{"indice":69,"nome":"UNAFISCO"},{"indice":1017,"nome":"UNIBANCO\/TEMPO SAUDE"},{"indice":1022,"nome":"UNIMED (FABIO)"},{"indice":1021,"nome":"UNIMED (GUALBERTO)"},{"indice":1024,"nome":"UNIMED (MARCIO)"},{"indice":1020,"nome":"UNIMED (RAFAEL)"},{"indice":1019,"nome":"UNIMED (SCOFANO)"},{"indice":1023,"nome":"UNIMED (TATIANA)"},{"indice":1001,"nome":"UNIMED CL\u00CDNICA"},{"indice":44,"nome":"URMES URGENCIAS ( R)"},{"indice":135,"nome":"VISITANTES"}]]}

这里是小提琴代码链接: http://jsfiddle.net/QZ3ff/2254/

0 个答案:

没有答案