[英]open a pdf file in local folder with html for offline interface
i am building an offline interface and want to show a pdf file when we click into a picture. 我正在建立一个离线界面,并希望在单击图片时显示pdf文件。 But it does not work now.
但是现在不起作用。 Please help me.
请帮我。 This is my code
这是我的代码
<a href="attachments/file.pdf"><img src="picture/nature.png" alt="pdffile"/></a>
Structure of directory 目录结构
|--- file.htm
|----picture
| |--- nature.png
|----attachments
| |--- file.pdf
Which browser are you using? 您正在使用哪个浏览器? In Chrome your supplied html worked fine for me.
在Chrome中,您提供的html对我来说效果很好。 Perhaps this could be to do with your directory structure.
也许这与您的目录结构有关。
I would make sure of the following: 我将确保以下几点:
attachments
should be in the same folder as your html file. attachments
应与html文件位于同一文件夹中。 Also make sure that there isn't invalid html around this line. 还要确保此行周围没有无效的html。 That could possibly be causing your html to not work instead.
那可能导致您的html无法正常工作。
Good luck :) 祝好运 :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.