gpt4 book ai didi

asp.net - 在单独的选项卡/窗口中打开 PDF

转载 作者:行者123 更新时间:2023-11-28 04:08:02 25 4
gpt4 key购买 nike

我正在使用以下代码在 IE 中显示 PDF 文档:

<a class="menu" href="file://MyServer/MyFolder/MyFile.pdf">Click Me!</a>

这会在当前选项卡中显示 PDF...我如何才能在新选项卡或新窗口(最好是新窗口)中打开它?

最佳答案

这是你在新窗口中的显示方式:

  <a class="menu" href="file://MyServer/MyFolder/MyFile.pdf" target="_blank">Click Me!</a>

target 属性可以在其他窗口或同一窗口中打开任何链接(不仅仅是 html 或 pdf)。了解一下 here .

     _blank  Renders the content in a new window without frames.
_parent Renders the content in the immediate frameset parent.
_search Renders the content in the search pane.
_self Renders the content in the frame with focus.
_top Renders the content in the full window without frames.

关于asp.net - 在单独的选项卡/窗口中打开 PDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8174262/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com