jquery – PDF嵌入或标记未加载在IE 11

我必须创建一个我正在使用的图像滑块:

galleriffic插件> http://www.twospy.com/galleriffic/”,

在图像滑块中,连同图像,我必须在某些情况下显示PDF.

并表示,我把< div>其将PDF内嵌入“< div class =”caption“>”您可以在其中显示与图像相关的描述.

对于带有PDF的滑块,您可以在这里看到完整的代码http://jsfiddle.net/Z99gr/2/

我正在尝试使用< object>或< embed>标签,它可以在Chrome和Firefox中正常工作.但不是在IE11.

我不能理解什么是丢失,因为我已经创建一个小提琴只有一个div嵌入PDF,它的工作正常在所有三个浏览器,Chrome,Firefox和IE11.

http://jsfiddle.net/dmAM3/1/

请查看问题,并建议尽快为IE 11缺少什么.

谢谢!

解决方法

我现在可以使用“< iframe>”嵌入PDF文件IE标签.

我替换了“< object>”和“< embed>”标有< iframe>所有3款浏览器,Firefox,Chrome和IE都可以正常工作.

在IE中嵌入PDF有两种方式.

第一种方式:直接在< iframe>中调用PDF

以下是更新的代码

<div id="pdf">
   <iframe src="https://www.adobe.com/products/pdfjobready/pdfs/pdftraag.pdf" style="width: 100%; height: 100%;" frameborder="0" scrolling="no">
        <p>It appears your web browser doesn't support iframes.</p>
   </iframe>
</div>

第二种方式:如果浏览器没有PDF阅读器,您可以在< iframe>中调用HTML页面.其中包含< object>标签 .

以下是第二选项的代码

<div id="pdf">
          <iframe src="pdf.html" style="width: 100%; height: 100%;" frameborder="0" scrolling="no">
               <p>It appears your web browser doesn't support iframes.</p>
          </iframe>
   </div>

“pdf.html”代码

<body>
    <object data="lorem.pdf" type="application/pdf">
        <p>It appears you don't have Adobe Reader or PDF support in this web browser. <a href="lorem.pdf">Click here to download the PDF</a>. Or <a href="http://get.adobe.com/reader/" target="_blank">click here to install Adobe Reader</a>.</p>
       <embed src="lorem.pdf" type="application/pdf" />
    </object>
</body>

这对我有用!

这是工作小提琴:http://jsfiddle.net/stmjvz4f/

希望将来有助于别人!

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...