Cross Domain Limitations With Ajax - JSON

前端 未结 4 794
无人共我
无人共我 2020-12-06 09:06

When requesting (ht|x)ml with ajax you can only send requests to the same domain. But if you request JSON you can send it to any domain. Why?

I\'m told it\'s for sec

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-06 09:28

    The reason it's called JSONP has actually little to do with JSON itself. Doing a cross-domain ajax request is as simple as adding the

提交回复
热议问题