鸡蛋加面粉可以做什么:我在网页中提供了打印功能,可是打印出来有个本页的网址,如何让它不打印出本页的网址?谢谢

来源:百度文库 编辑:中科新闻网 时间:2024/05/05 01:28:42
网页是用ASP开发的!打印的代码为:<input type="button" name="Print" value=" 打 印 " onClick="this.style.display='none';window.print();this.style.display='';this.value=' 再打印一次 '">哪位高手能指点迷经?

在ie的文件>页面设置中去掉\"页眉\"\"页脚\",或者用以下代码
<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+hkey_key,\"&u&b&d\"
end function
</script>