注册 登录
编程论坛 ASP.NET技术论坛

关于imageButton事件中怎样设置target=_blank

airfei 发布于 2007-04-25 21:51, 1772 次点击
imageButton我编写了个事件,response.redirect("a.aspx")
但是我想在新窗口中打开,imageButton如何设置target=_blank
9 回复
#2
sdlklhd2007-04-26 13:42

1、response.write("<script language='javascript'>window.open('index.html');</script>");
2、在page.load中:
imagebutton.attributes.add("onclick","javascript:return showopen();");
在html页:
<script language="javascript">
<!--
function showopen()

{

window.location("index.html");

}
</script>
http://topic.csdn.net/t/20040827/10/3314402.html

#3
djx5202007-04-28 14:48
直接在后面加上target="_blank"属性就可以了
#4
sdlklhd2007-04-29 09:47

试一试

#5
airfei2007-04-29 21:26
response.write("<script language='javascript'>window.open('index.html');</script>");
这种方法,我想传递一个整形变量response.redirect("a.aspx?Id="+Id);
#6
sdlklhd2007-05-03 09:48
靠谱
#7
tel19822007-05-03 14:03
这个怎么弄呢?我也不知道。
#8
sdlklhd2007-05-03 14:53
接收参数后,进行转换。
#9
guming2007-05-04 15:40
response.redirect("a.aspx?Id="+Id,true);
#10
sdlklhd2007-05-08 14:31
不明白什么意思,愿请教
1