up

解决方案 »

  1.   

    <script language="Javascript"><!--
    function doprint() {
      var h = factory.printing.header;
      var f = factory.printing.footer;
      document.all("printbtn").style.visibility = 'hidden';
      factory.printing.header = "";
      factory.printing.footer = "";
      factory.DoPrint(false);
      factory.printing.header = h;
      factory.printing.footer = f;
      document.all("printbtn").style.visibility = 'visible';
    }
    //--></script>
    <body>
    <br/><br/><br/>
    <object id=factory style="display:none"
    classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" viewastext codebase="ScriptX.cab#Version=5,0,4,185">
    </object>
    <br/><br/>
    <div id="printbtn"><input name=idPrint type=button value="Print the letter" onclick="doprint()"></div>
    </body>保存为.html
      

  2.   

    IE属性得设置一下//" 启用没有签名的activex控件"
      

  3.   

    把下面代码保存为文件(*.vbs),直接执行:
    '****************设置打印的一些参数****************
    dim hkey_root,hkey_path,hkey_key
    hkey_root="HKEY_CURRENT_USER"
    hkey_path="\Software\Microsoft\Internet Explorer\PageSetup"
    '设置网页打印的页眉页脚为空
    Set RegWsh = CreateObject("WScript.Shell")
    hkey_key = "\header"    
    RegWsh.RegWrite hkey_root + hkey_path + hkey_key,"&w&b第&p页 共&P页"
    hkey_key = "\footer"
    RegWsh.RegWrite hkey_root + hkey_path + hkey_key,""
      

  4.   

    另外:
    IE页面设置参数以及说明:
    页面标题:&w
    页面路径:&u
    当前页号:&p
    总共页数:&P
    当前日期:&d
    当前时间:&t
    右对齐:&b
      

  5.   

    web报表打印演示版本,可以加我msn: [email protected] 
    我可以发给你,与国外的FastReport功能类似。
    web打印小组件,可以看http://www.fcsoft.com.cn/eprint/index.htm 这里有在线演示