首页 新闻 会员 周边

急求高手指点呀。。。。

0
悬赏园豆:20 [已关闭问题] 关闭于 2011-08-01 19:21

请高手指点,我在做javascript的无页眉页脚的打印。代码如下 

  var hkey_root;  

 var hkey_path; 

  var hkey_key; 

  hkey_root="HKEY_CURRENT_USER";  

 hkey_path="\\Software\\Microsoft\Internet Explorer\\PageSetup\\"; 

 function test(){     

 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,"");        

    window.print();       

     alert('ok');     

  }catch(e){        

    alert(e);      

 } } 

可是问题出现了,这样做还是没法去掉页眉和页脚,把注册表页眉页脚都设为空了,可是为什么还不行呢?求高手指点呀,在线等。

lxl631的主页 lxl631 | 初学一级 | 园豆:187
提问于:2011-08-01 16:28
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册