Help with getting Json Format data from external website

后端 未结 4 1434
面向向阳花
面向向阳花 2021-01-23 13:59

I am trying to get Json format data from this website .. http://www.livetraffic.sg/feeds/json

however when i use ajax.. i run into this particular error in my chrome con

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-23 14:29

    You cannot make cross-domain JSON requests. Your browser will not allow it. If the target domain allows JSONP requests http://en.wikipedia.org/wiki/JSONP#JSONP then you'll be able to use this work-around instead. Else you'll have to make the request server-side.

提交回复
热议问题