Opening a new tab to read a PDF file

后端 未结 9 1046
广开言路
广开言路 2021-02-06 21:39

I am probably missing something simple here, however i will ask anyway. I have made a link to open up a PDF file, however it opens up in the current tab rather than a new one. W

相关标签:
9条回答
  • 2021-02-06 22:23

    Change the <a> tag like this:

    <a href="newsletter_01.pdf" target="_blank">
    

    You can find more about the target attribute here.

    0 讨论(0)
  • 2021-02-06 22:27

    Try this, it worked for me.

    <td><a href="Docs/Chapter 1_ORG.pdf" target="pdf-frame">Chapter-1 Organizational</a></td>

    0 讨论(0)
  • 2021-02-06 22:29

    Will open your pdf in a new tab with pdf viewer and can download too

    <a className=""
       href="/project_path_to_your_pdf_asset/failename.pdf"
       target="_blank"
    >
       View PDF
    </a>
    
    0 讨论(0)
  • 2021-02-06 22:33

    Just use target on your tag <a>

    <a href="newsletter_01.pdf" target="_blank">Read more</a>
    

    The target attribute specifies where to open the link. Using "_blank" will make your browser to open a new window/tab.

    You could also use target in many ways. See http://www.w3schools.com/tags/att_a_target.asp

    0 讨论(0)
  • 2021-02-06 22:36

    Use the below attribute in tag to open it in next tab

    target="_blank"
    
    0 讨论(0)
  • 2021-02-06 22:40

    You have to use target attribute

    <a href="newsletter_01.pdf" target="_blank">
    
    0 讨论(0)
提交回复
热议问题