时间: 2021-07-31 作者:daque
<script language="javascript">var hkey_root,hkey_path,hkey_keyhkey_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><input type="button" value="清空页码" onclick=pagesetup_null()><input type="button" value="回复页码" onclick=pagesetup_default()>