“invalid label” Firebug error with jQuery getJSON

后端 未结 2 562
北荒
北荒 2020-12-04 01:03

I\'m making a jQuery $.getJSON request to another domain, so am making sure that my GET URI ends with \"callback=?\" (i.e. using JSONP).

The NET panel o

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 01:23

    It looks like you're misusing JSONP in your server script.

    When you receive a request with a callback parameter, you should render the following:

    callbackName({ "myName": "myValue"});
    

    Where callbackName is the value of the callback parameter.

提交回复
热议问题