zoukankan      html  css  js  c++  java
  • WEB客户端页面打印

    function PreviewPrint()
    {
         bdhtml=window.document.body.innerHTML;
         sprnstr="<!--startprint-->";
         eprnstr="<!--endprint-->";
         prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
         prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
         window.document.body.innerHTML=prnhtml;
         window.print();
         window.location.href = window.location.href;
         window.parent.returnValue='0';
         window.parent.close();
    }
    function PreviewPrintCancel() 
    {
        window.parent.returnValue='0';
        window.parent.close();
    }
     function CloseWin()
    {
        window.parent.returnValue='1';
        window.parent.close();
    }
    function DoNothingAndCloseWin()
    {
        window.parent.returnValue='DoNothing';
    }
    
    
    //<script  language="javascript">     
    
    //function  printsetup(){   
    ////  打印页面设置   
    //wb.execwb(8,1);   
    //}   
    //function  printpreview(){   
    ////  打印页面预览   
    //                  
    //wb.execwb(7,1);   
    //                  
    //}   
    
    //function  printit()   
    //{   
    //if  (confirm('确定打印吗?')){   
    
    //wb.execwb(6,6)   
    //}   
    //}   
    //</script>   
    //<OBJECT  classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"     
    
    //height=0  id=wb  name=wb  width=3></OBJECT>   
    //<input  class="ipt"  type=button  name=  button_print  value="打印"     
    //onclick  ="  javascript  :printit();">   
    //<input  class="ipt"  type=button    name=button_setup  value="打印页面设置"             
    
    //onclick  ="  javascript  :  printsetup();">     
    //<input  class="ipt"  type=button    name=button_show  value="打印预览"             
    
    //onclick="javascript:printpreview();">     
    //<input  class="ipt"  type=button  name=  button_fh  value="关闭"             
    
    //onclick  ="javascript:window.close();">
  • 相关阅读:
    Window frames[]集合(转)
    ObjectDataSource 如何传递查询参数
    前台如何解析json格式 以及后台如何生成json格式
    Burrows–Wheeler transform
    windows xp中安装PadWalker
    ORA01207:文件比控制文件更新 旧的控制文件
    如何看懂NCBI BLAST输出结果
    Perl getopts
    blast formatdb 使用方法介绍
    Randfold安装
  • 原文地址:https://www.cnblogs.com/surge/p/2709883.html
Copyright © 2011-2022 走看看