欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

javascript實現(xiàn)window.print()去除頁眉頁腳

 更新時間:2014年12月30日 16:45:56   投稿:hebedich  
這篇文章主要介紹了javascript實現(xiàn)window.print()去除頁眉頁腳的方法以及各參數(shù)的設(shè)置技巧,需要的朋友可以參考下

打印時去除頁眉頁頁腳 打印前加入下面代碼即可 var HKEY_Root,HKEY_Path,HKEY_Key;

復(fù)制代碼 代碼如下:

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

//設(shè)置頁眉(為空) 根據(jù)你自己要設(shè)置的填入

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

 HKEY_Key="footer";

//設(shè)置頁腳(為空) 根據(jù)你自己要設(shè)置的填入

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

 HKEY_Key="margin_bottom";

//設(shè)置下頁邊距(0) 根據(jù)你自己要設(shè)置的填入

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

 HKEY_Key="margin_left";

//設(shè)置左頁邊距(0) 根據(jù)你自己要設(shè)置的填入

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

 HKEY_Key="margin_right";

//設(shè)置右頁邊距(0)

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

 HKEY_Key="margin_top";

//設(shè)置上頁邊距(8)

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

相關(guān)文章

最新評論