本文介绍了弹出窗口阻止程序打开时,在ajax成功回调中弹出一个新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在ajax调用成功后弹出一个新窗口(不是页面内的对话框或类似对话框)。浏览器的弹出窗口阻止程序将阻止 window.open()。那么如何解决这个问题?

I need to popup a new window (not a dialog inside the page or similar) after a ajax call succeeds. window.open() will be blocked by the popup blocker of browsers. So how to solve this?

推荐答案

你做不到。您可以做的最好的事情是在呼叫成功时在页面上提供通知链接,并在用户点击链接时打开弹出窗口。

You can't. The best you can do is provide a notification link on the page when the call succeeds and open the popup when the user clicks on the link.

这篇关于弹出窗口阻止程序打开时,在ajax成功回调中弹出一个新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 16:03