2017-01-11 385 views
1

我在iframe url中使用#toolbar=0&navpanes=0&scrollbar=0來禁用工具欄,但在Mozzila中它不起作用。我tryed導入JavaScript插入iframe中,但相同的結果.... 的iframe:在默認PDF查看器中禁用/隱藏iframe中的下載按鈕

<iframe ?wmode="transparent" type="application/pdf" id="iframe" src="'.$url.'#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="685"></iframe> 

使用JS:

jQuery('#iframe').load(function(){ 
    jQuery('#iframe').contents().find("#toolbarViewerRight").hide(); 
}); 

任何想法,我如何可以禁用/刪除/隱藏此工具欄或只下載按鈕?

+0

http://stackoverflow.com/questions/11658011/cannot-modify-content- of-iframe-what-wrong-error – yivi

+1

可能重複的[無法修改iframe的內容,出了什麼問題?](http://stackoverflow.com/questions/11658011/cannot-modify-content-of-iframe-what-是錯的) – yivi

+0

它doesn = t爲我工作。我試圖隱藏和刪除,但沒有改變...它可以是PDF查看器的默認選項,它阻止我刪除/隱藏toolbarViewerRight – Juraj

回答

-1

嘗試以下操作:

<iframe src="kd/kd.pdf?page=hsn#toolbar=0" width="100%" height="1000" id="iframe11"> 
</iframe> 
0

嘗試使用嵌入標籤,而不是iframe標籤,就像這樣:

<embed src="http://host/yourpdf.pdf#toolbar=0" style="width:600px; height:500px;"> 
相關問題