我想做到  打印的时候 去掉页眉和页脚,我在网上找了一个,可是我运用后还是能在打印预览中看到,
我是用ie的WebBrowser 做的打印功能。
我在网上找到去掉页眉和页脚的 代码是 :
var hkey_root,hkey_path,hkey_key 
   hkey_root="HKEY_CURRENT_USER" 
   hkey_path="file://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){} 
} 我调用pagesetup_null() 在ie的打印预览中还是能看到页眉和页脚,问强人,怎么做能去掉页眉和页脚,并在打印的时候也不会出现。求代码