var a = window.open("https://www.baidu.com/"); if(a==null){ alert("当前新窗口已被浏览器拦截,请点击窗口右上角的设置,允许弹出!") } 未拦截时正常弹出窗口没有提示,若拦截时有以下提示