| 发表于:2007-05-16 13:07:38 楼主 |
各位高手 非常着急的一个java修改注册表问题,如果能有其他更好的方法,解决以下这一问题,请指点指点,谢谢!! 我现在需要调用ie的打印功能,调用是没有问题的,但打印出来的报表上 总是会显示:报表的页脚,页眉 我不需要页脚,页眉的显示,但是又不想通过页面设置这个界面去取消, 需要通过java,或者js的处理去掉页脚和页眉 不知道是否有方法实现? 我用以下方法尝试了,但没有起作用: 请高手帮忙看看,谢谢: <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){} } pagesetup_null(); </script> </head> |
|
|
|
|