$.getJson not working in IE

前端 未结 3 756
迷失自我
迷失自我 2021-01-18 04:48

Ok, for some reason my getJson is not working. I am pulling some stock information and it works in all major browsers except IE.

I have created a JSfiddle here: htt

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-18 05:31

    Technically, I think you're violating the Same Origin Policy on this one. By definition, you can't do a JSON get from a domain other than your own....and getting data from Yahoo is certainly a different server than jsFiddle's. There is a similar issue reported here. The CORS exceptions they list are IE up to version 10, which would explain the issue perfectly.

    The problem could be solved by using a "?" in your callback handler. See this stack article for more info.

提交回复
热议问题