900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > 打印网页时去掉页眉页脚

打印网页时去掉页眉页脚

时间:2018-10-23 01:17:28

相关推荐

打印网页时去掉页眉页脚

打印网页时去掉页眉页脚,打印网页时去掉页眉页脚

<script language="JavaScript"

var hkey_root,hkey_path,hkey_key

hkey_root="HKEY_CURRENT_USER"

hkey_path="\Software\Microsoft\InternetExplorer\PageSetup\"

//设置网页打印的页眉页脚为空

function pagesetup_null(){

try{

var RegWsh = new ActiveXObject("")

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("")

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()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。