To add a printing footer to HTML page

MyPlanet 2003-08-20 10:16:48
Is it possible to add a printing footer to HTML page? If so, please show me some code.
...全文
41 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
MyPlanet 2003-08-21
  • 打赏
  • 举报
回复
And I don't want to use Factory object.
wanghr100 2003-08-21
  • 打赏
  • 举报
回复
You have two ways to solve.
1.amend regedit
2.use print component

1.// But have some security warning.

<HTML>
<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"
'//Not print footer
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
'//print footer.
function pagesetup_default()
on error resume next
Set RegWsh = CreateObject("WScript.Shell")
hkey_key="\header"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&w&bPage,&p/&P"
hkey_key="\footer"
RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"&u&b&d"
end function
</script>
</HEAD>

<BODY>
<br>
<br>
<br>
<br>
<br>
<br><p align=center>
<input type="button" value="clear footer" onclick=pagesetup_null()> <input type="button" value="resume footer" onclick=pagesetup_default()><br>

</p>
</BODY>
</HTML>

2.
http://www.csdn.net/cnshare/soft/17/17851.shtm

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧