Access to restricted URI denied“ code: ”1012 - Cross domain Ajax request

前端 未结 6 1122
梦如初夏
梦如初夏 2020-12-09 11:35

I Need to do cross domain Ajax request - Here is my code

 $.ajax(
        {
            url: redirectURL,
            data: $(\'#login-container form\').ser         


        
6条回答
  •  有刺的猬
    2020-12-09 12:07

    JSONP is not really Ajax in a way that it does not use XMLHttpRequest but a dynamic script element. jQuery makes this transparent but JSONP still requires the following to work:

    1. HTTP GET only, you can't use POSTs
    2. the server needs to support it by wrapping the response in a call to the callback you specify

    Check if the URL you request supports JSONP and change the call to an HTTP GET.

提交回复
热议问题