jquery window.open in ajax success being blocked

后端 未结 3 1721
我在风中等你
我在风中等你 2020-12-01 09:41

Trying to open a new browser window in my ajax success call, however, it is blocked as a popup. I did some searching and found that a user event needs to be tied to the win

3条回答
  •  春和景丽
    2020-12-01 09:54

    Do a window.open("about:blank", "newPage"); before the AJAX call and then after the call add the URL to the opened window by calling window.open("http://google.com", "newPage");.

提交回复
热议问题