避免弹出窗口阻止JavaScript [英] Avoid popup blocking JavaScript
本文介绍了避免弹出窗口阻止JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用
I am using
Response.Write("<script>window.open('WebForm1.aspx')</script>")
但是我的页面没有打开,显示弹出窗口被阻止..
因此,如何避免这种
But my page is not open it displays popblocked..
So how to avoid this
推荐答案
这是浏览器的安全功能,只能由用户更改.您无法通过代码进行更改.您需要使用其他替代方法进行弹出.使用此AJAX PopupControl
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/PopupControl/PopupControl.aspx [ ^ ]
It is a browser security feature and can be altered only by the user. You cannot change it through code. You need to use other alternative for popup. Use this AJAX PopupControl
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/PopupControl/PopupControl.aspx[^]
尝试一下:
Try this:
RadScriptManager.RegisterClientScriptBlock(base.Page, this.GetType(), "Complete", "window.open('WebForm1.aspx');", true);
--Amt
--Amt
这篇关于避免弹出窗口阻止JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文