读书人

急ie6 打印 怎么调整页眉页脚字体大小

发布时间: 2012-12-24 10:43:13 作者: rapoo

急!ie6 打印 如何调整页眉页脚字体大小
最近需要用到ie打印功能 但是发现如果是ie6无法调整页眉页脚字体大小 默认字体比页面字体大得多 请问怎么调整?

我知道ie8里边在页面设置有调整大小的
[最优解释]

<script language="javascript">
<!--
var HKEY_Path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
// 定义注册表位置 // name的值可为header(页眉),footer(页脚),margin_bottom(下边距margin_left(左边距),margin_right(右边距),margin_top(上边距)。
function PageSetup(name,value)
{
try {
var Wsh = new ActiveXObject("WScript.Shell");
Wsh.RegWrite(HKEY_Path+name,value); // 修改注册表值
}catch(e) {
//
alert(e.name + " " + e.message); //alert('需要运行ActiveX对象后,才能进行打印设置。');
}
}

function setit() {
PageSetup("footer", "");
PageSetup("header", "");
window.print();
} //-->
</script>

[其他解释]
<script language="javascript"> <!-- var HKEY_Path = "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"; // 定义注册表位置 // name的值可为header(页眉),footer(页脚),margin_bottom(下边距margin_left(左边距),margin_right(右边距),margin_top(上边距)。 function PageSetup(name,value) { try { var Wsh = new ActiveXObject("WScript.Shell"); Wsh.RegWrite(HKEY_Path+name,value); // 修改注册表值 }catch(e) { //alert(e.name+" "+e.message); //alert('需要运行ActiveX对象后,才能进行打印设置。'); } } function setit() { PageSetup("footer",""); PageSetup("header",""); window.print(); } //--> </script> 

读书人网 >windows

热点推荐