请问如何使用JavaScript在IE打印中取消页眉页脚

解决方案 »

  1.   

    请参考http://www.fcsoft.com.cn/webprint/index.html,有问题请加msn:[email protected]
      

  2.   

    如下即可解决,当然也可以自己写javascript打印。
    //设置网页打印的页眉页脚为空 
    function pageSetup_Null() 

    try { 
            var Wsh=new ActiveXObject("WScript.Shell"); 
    HKEY_Key="header"; 
    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); 
    HKEY_Key="footer"; 
    Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); 
      } 
      catch(e){} 

    <body bgcolor="#FFFFFF" text="#000000" onload="pageSetup_Null()" topmargin="0">