用javascript控制的话,去asp 和 javascript板块搜索。。

解决方案 »

  1.   

    如果只能用javascript那只能用window.print,但是window.print不能控制打印样式,只能手动设置ie的打印属性
    如果可以用activex的话就比较容易了,网上关于ActiveX:IEWebBrowser的execWB的文章多的是,你google一下了
      

  2.   

    <script language="JavaScript">
    var hkey_root,hkey_path,hkey_key
    hkey_root="HKEY_CURRENT_USER"
    hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"
    //设置网页打印的页眉页脚为空
    function pagesetup_null()
    {
      try{
        var RegWsh = new ActiveXObject("WScript.Shell")
        hkey_key="header"    
        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
        hkey_key="footer"
        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
      }catch(e){}
    }
    //设置网页打印的页眉页脚为默认值
    function pagesetup_default()
    {
      try{
        var RegWsh = new ActiveXObject("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,"&u&b&d")
      }catch(e){}
    }
    </script>
      

  3.   

    在浏览器里设置
    不要随便使用activex。
      

  4.   

    嗯.太复杂了吧.我有一个简单的方法.把网页复制 然后到word Paste 然后编辑再打印.