search

Home  >  Q&A  >  body text

javascript - I have a question about setting the page title after opening a pdf file on a web page?

I need to open a pdf file in a web page. I use the original method window.open(myurl) in javascript to open the pdf. Everything else is fine, except that the title of the page displays the information in the url. I want to set my own The title has never had any effect. I have tried some methods on the Internet, including setTitle and setTimeout, but they have no effect.

I use other methods, such as iframe, which will be blocked by the browser, may be cross-domain, and is considered unsafe. I used the pdfobject.js library again, and everything else was normal, but I couldn't save in chrome. I guess there was a bug in the chrome plugin.

What method do you usually use? Which method will not have these problems?

为情所困为情所困2753 days ago453

reply all(1)I'll reply

  • 某草草

    某草草2017-05-19 10:17:26

    Microsoft ie11 and edge are perfect for opening pdf. The respondent can take a look.

    reply
    0
  • Cancelreply