如何在新窗口中打开HTML页面 [英] how to open A html Page in new Window

查看:696
本文介绍了如何在新窗口中打开HTML页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Dir HTMLReports中有一个HTML页面...我想在用户Click in New Window中打开HTML页面.我已按下一个按钮,然后单击该按钮,更新面板"触发了回发..."按钮上的单击事件,我已编写了此代码..

Hi I have a HTML Pages in Dir HTMLReports... I want to open HTML pages on user Click in New Window. I have taken one Button and on click of that button Update Pannel Triggers a PostBack... An on button click event I have written this Code..

httpContext.Current.response.Write("<Script> window.open('HtmlReports/HtmlRpt.html','Rpt_Title') </Script>")
httpContext.Current.response.end()



我的输出是这样的...

显示与HtmlRpt.html一起打开的新窗口
但是
我当前的页面上没有显示我的按钮,什么都没显示

如何克服这个问题?请给我一些建议



My output is Something Like this...

A New Window Get Open Along With HtmlRpt.html is Displayed
but
My Current Page In Which i Have Button That Becomes Blank Nothing is Displayed

How to overcome this problem? Please give me some suggestions

推荐答案

<a href="Enter ur address here" target="_blank">Enter</a>



选择"Enter"后,将重定向到新窗口中的目标页面.



When you have select the ''Enter'', you will be redirect to the targeted page in new window.


请勿使用服务器端代码将窗口打开到新的弹出位置(如果不需要).您可以使用客户端功能在新的弹出位置中打开窗口.代码是:

< a href =您想打开的地址" target ="_ blank">要显示的标签</a>

让我知道是否需要更多信息.
Do not use server side code to open the window into new pop-up location (if its not required). You can use the client side functionality to open the window in new pop-up location. The code is:

<a href="The Address You want to be open" target="_blank"> The Label to be display </a>

Let me know if you need more information.


使用此CP文章
Use this CP article
Response.Redirect into a new window[^]


这篇关于如何在新窗口中打开HTML页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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