打印是浏览器控制滴,没开放接口,js无能为力。告知用户:文件->打印设置->手动清除页眉、页脚默认设置。
解决方案 »
- 百度地图API InfoWindow不会打开的问题
- 怎么关闭整个播放的视频
- 如果使dojo.charting的x轴以时间格式显示?
- JS传参问题...
- showModalDialog的问题
- checkbox的问题:如何删除选中的记录?用checkbox,动态生成的checkbox————急,在线等待
- 如何向一个html页中提交大量数据?post方法不能用于静态页,get方法提交的数据有大小限制,怎么办?
- 如何在客户端脚本中调用用户本地的应用程序并传递参数?解决者分全给
- 提问: RegExp $X 问题……
- 请问怎样来利用Javascript,把一个TXT文件里的数据读出!
- 谁能帮偶写一个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
那你想都不用想了!