打印是浏览器控制滴,没开放接口,js无能为力。告知用户:文件->打印设置->手动清除页眉、页脚默认设置。
解决方案 »
- 请问Grails日历插件:自定义年份范围的参数怎么设置?
- 献个丑 初学jQuery写了一个插件 用于倒计时的
- getComponentVersion函数的用法
- 【献出在csdn的所有分,求】JavaScript onerror 事件
- javascript计算输入文本框的文字个数,但是中文和英文怎么区别?中文要两个字节
- 有关级联,简单的问题,但是难煞新手
- showModalDialog的窗口想刷新主窗口
- 请教:过年了,帮帮小弟的忙!用javascript怎样将xml文件导出成Excel(XP或者2003)?急!
- "您有新的短消息":两者之间的通讯是怎么实现的?
- 三个输入框,a,b,c,当a,和b输入整数后,c自动出现a和b的乘积
- 谁能帮偶写一个JavaScript小程序
- 网站里的js文件最后被嵌入恶意js代码
<head>
<title> new document </title>
<meta name="generator" content="editplus">
<meta name="author" content="yc">
<script language="vbscript">
dim hkey_root,hkey_path,hkey_key
hkey_root="hkey_current_user"
hkey_path="\software\microsoft\internet explorer\pagesetup"
"//设置网页打印的页眉页脚为空
function pagesetup_null()
on error resume next
set regwsh = createobject("wscript.shell")
hkey_key="\header"
regwsh.regwrite hkey_root+hkey_path+hkey_key,""
hkey_key="\footer"
regwsh.regwrite hkey_root+hkey_path+hkey_key,""
end function
"//设置网页打印的页眉页脚为默认值
function pagesetup_default()
on error resume next
set regwsh = createobject("wscript.shell")
hkey_key="\header"
regwsh.regwrite hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&p"
hkey_key="\footer"
regwsh.regwrite hkey_root+hkey_path+
就是说在IE7里不能通过JS来隐藏页眉和页脚咯?
但是,一般客户端没有wscript.shell
那你想都不用想了!