<object id="wb" height="0" width="0" viewastext classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" name="wb"></object> function printpreview()
{
document.getElementById("wb").execwb(7,1);
}
function printset()
{
document.getElementById("wb").execwb(8,1);
}
function print()
{
if (confirm('确定打印吗?'))
{
document.getElementById("wb").execwb(6,6) ;
}
我是使用这种方式打印页面的,
但打印出来有页眉、页脚。 这些是不需要的
之前我用
var hkey_root,hkey_path,hkey_key;
hkey_root="HKEY_CURRENT_USER";
hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
//设置网页打印的页眉页脚为空
window.onload=function(){
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){}
}可没有效果。。
希望高手指点下,,想通过程序实现。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货