jquery (ajax) redirect to another domain

后端 未结 3 839
陌清茗
陌清茗 2021-01-17 06:18

I have the jquery json request in the following format:

JSON request:

$.getJSON(\'http://xyz.com\',function(result) {});

If the req

3条回答
  •  臣服心动
    2021-01-17 07:06

    I think that it may be better to use $.ajax(), error method or success if the server tells you based on the response).

    Then use this to redirect the browser.

    window.location = "http://www.google.com"
    

提交回复
热议问题