900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > php打印当前页面隐藏页眉 javascript实现window.print()去除页眉页脚_javascript技巧

php打印当前页面隐藏页眉 javascript实现window.print()去除页眉页脚_javascript技巧

时间:2019-05-14 13:31:56

相关推荐

php打印当前页面隐藏页眉 javascript实现window.print()去除页眉页脚_javascript技巧

HKEY_Root="HKEY_CURRENT_USER";

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

var head,foot,top,bottom,left,right;

var Wsh=new ActiveXObject("WScript.Shell");

HKEY_Key="header";

//设置页眉(为空) 根据你自己要设置的填入

Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");

HKEY_Key="footer";

//设置页脚(为空) 根据你自己要设置的填入

Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");

HKEY_Key="margin_bottom";

//设置下页边距(0) 根据你自己要设置的填入

Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0");

HKEY_Key="margin_left";

//设置左页边距(0) 根据你自己要设置的填入

Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"1");

HKEY_Key="margin_right";

//设置右页边距(0)

Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"0");

HKEY_Key="margin_top";

//设置上页边距(8)

Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"1");

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