在html上面显示pdf代码(禁用工具栏)

来源:互联网 发布:深圳开网络出租屋 编辑:程序博客网 时间:2024/06/03 06:31
<link type="text/css" href="<%=ctxPath%>/egp/css/style/css.css" rel="stylesheet"/>
   <script type="text/javascript">
      window.onload=function(){
        document.all[document.getElementById("PDFNotKnown") ? "IfNoAcrobat" : "showdiv"].style.display = "block";
        //当能显示pdf的时候,设置工具栏无用
        if(document.getElementById("showdiv").style.display=="block"){
            pdf.SetShowToolbar(false);
            //document.getElementById("pdf").EnableCopy=false;
            //document.getElementById("pdf").EnablePrint=false;
        }
      }
      
    
    
    // 禁用右键功能
    function stop(){
     return false;
     }
    document.oncontextmenu=stop;
    
    //禁止F8按钮
    function keypressed() {
        if(event.keyCode == 119) {
           event.keyCode = 0;
           return false;
        }
    }
   </script>
   


<div class="right" id="abc" style="margin-top:-20px;">
 <div class="cont-boxwrap2" id="c1">
    <div class="con2" id="c2">   
       <h2 class="title"><span>意外险查询</span></h2>
 <div class="boxwrap2" style="width:660px;overflow:auto;" id="cb2">
 <div class="text-tabel1" style="overflow:auto;">
                <fieldset class="auto_height" style="border:1px solid #ccc; background-color:#FFFFFF;">
                <legend  class="theme-color f16">条款预览</legend>
                <div style="overflow:hidden;height:660px;">
                        <DIV id="IfNoAcrobat" style="display:none">
                              <a href="http://get.adobe.com/cn/reader/">你需要先安装Adobe Reader才能正常浏览文件,请点击这里下载Adobe Reader.</a>   
                        </DIV>
                        <OBJECT type="application/pdf" width=0 height=0 style="display:none">
                           <DIV id="PDFNotKnown" style="display:none">&nbsp;</DIV>
                        </OBJECT>
                        <DIV id="showdiv"   
                            style="HEIGHT: 10px; margin-top: 10px;display: none;">  
                            <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"   width="100%" height="660" border="0" top="-10" name="pdf" id="pdf" >   
                            <param name="toolbar" value="false">  
                            <param name="pagemode" value="none">
                            <param name="_Version" value="65539">  
                              
                            <param name="_ExtentX" value="20108">  
                              
                            <param name="_ExtentY" value="10866">  
                              
                            <param name="_StockProps" value="0">  
                        
                            <param name="SRC" value="<%=ctxPath%>/clause/<%=request.getParameter("clauseTemp")%>">
                            </object>
                        </DIV>  
                </div>
                </fieldset>
            </div>
             <div class="btn-area" style="margin-top:10px;width:200px; margin-right:30%!important;margin-right:17%">
                   <div class="btn-themecolor" ><a href="###" onclick=" javascript:window.history.go(-1);">返回</a></div>
            </div>
          </div>
          
  </div>
  </div>
  </div>
 <!-- 禁止另存为 -->
    <noscript><iframe src=*.html></iframe></noscript>
原创粉丝点击