超链接按钮弹出窗口,带有2个按钮。 [英] Hyperlink button pop up window with 2 buttons.

查看:101
本文介绍了超链接按钮弹出窗口,带有2个按钮。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net中我在asp.net中有超链接按钮,当我点击按钮打开一个弹出窗口,其中有一些标题有4行内容和OK和取消按钮。当我点击确定按钮时,它会重定向到其他网站。该网站应在新标签中打开。你可以帮忙吗。



我尝试了什么:



我尝试使用点击事件

函数basicPopup()

{

popupWindow = window.open(我的内容,'popUpWindow ','height = 300,width = 600,left = 100,top = 30,resizable = No,scrollbars = No,toolbar = no,menubar = no,location = no,directories = no,status = No');

}

& lt; / script>

解决方案

用于决策弹出而不是打开一个新窗口,你应该打开一个DIV(如果你没有使用任何基于客户端的UI框架,比如Kendo UI)。



DIV应该显示四行文字和两个按钮OK和取消。单击确定后,您应该使用Window.Open javascript api打开新窗口。但它的浏览器的行为如果新页面将作为新选项卡新窗口打开。您可以参考以下文章以获得更多信息;

使用JavaScript在新标签页(而不是新窗口)中打开一个URL - Stack Overflow

In asp.net I have hyperlink button in asp.net when I am click the button open a pop-up window with some heading some 4 lines of content and OK and cancel button. When I am click the OK button it's redirect to some other site. That site should be open in new tab. Could you please help on this.

What I have tried:

I am tried using on click event
function basicPopup()
{
popupWindow = window.open("my content", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
}
</script>

解决方案

For decision making popup instead of open a new window, you should open a DIV (if you are not using any client based UI framework like Kendo UI).

DIV should show the four lines of text and two buttons OK and Cancel. On clicking OK, you should open the new window using Window.Open javascript api. But its the behaviour of the browser if the new page would be open as new tab new window. You could refer following article for more insight on it;
Open a URL in a new tab (and not a new window) using JavaScript - Stack Overflow


这篇关于超链接按钮弹出窗口,带有2个按钮。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆