在打印web页面时如何让它不显示下面的网址和上面的页码? 在打印web页面时如何让它不显示下面的网址和上面的页码? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 (1)ie的文件-〉页面设置-〉讲里面的页眉和页脚里面的东西都去掉,打印就不出来了。 (2)<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" ’//设置网页打印的页眉页脚为空 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> </HEAD> <BODY> <br/> <br/> <br/> <br/> <br/> <br/><p align=center> <input type="button" value="清空页码" onclick=pagesetup_null()> <input type="button" value="恢复页吗" onclick=pagesetup_default 是不是可以使用panel.再设定打panel中的内容 lnwuyaowei(风可以追我),你好,你的方法我试过了,页面提示有错误 http://www.wave12.com/web/SigCon.asp?bCate=50&sCateName=%B9%A6%C4%DC%BD%E9%C9%DC&ID=173&CateName=wsReport4.5 <!-- startprint -->您要打印的部分;<!-- endprint --><div><input tupe=botton name="Print" value="打印" onclick="prit()"</div>教本如下:<script language="javascript">function prit(){ bdhtml=window.document.body.innerHtml; strstart="<!-- startprint -->"; strend="<!-- end -->"; prnstr=bdhtml.substr(bdhtml,indexof(strstart)+17)prnstr=bdhtml.substring(0,prnstr.indexof(strend))window.document.body.innerHtml=prnstr;window.print();}</script> css里面可以比较简单的设置========欢迎使用www.bz2008.com 可以辅助生成大部分的程序代码,注册即可使用支持所有开发语言和平台 <OBJECT id="WebBrowser" height="0" width="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" VIEWASTEXT></OBJECT><INPUT onclick="document.getElementById('WebBrowser').ExecWB(8,1)" type="button" value="页面设置"><INPUT onclick="document.getElementById('WebBrowser').ExecWB(7,1)" type="button" value="打印预览"> 这样的话怎么获取到ID值 在线等 大家好,我想问一下在jQuery中如何获取上一个网页传过来的request.querystring的值 文件大小问题,特奇怪 请教SQL2005 查询字段描述 100分求教,分不够可以加 sql語法 如何打开一个网页窗口不显示地址栏 System.ComponentModel.Win32Exception: 拒绝访问 asp.net用什么类来配置颜色!大虾快来呀! datagrid的显示问题 急救!!!GDI+ 中发生一般性错误, 请大虾们指点! Asp.net文件编程问题.
(2)<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"
’//设置网页打印的页眉页脚为空
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>
</HEAD> <BODY>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/><p align=center>
<input type="button" value="清空页码" onclick=pagesetup_null()> <input type="button" value="恢复页吗" onclick=pagesetup_default
您要打印的部分;
<!-- endprint -->
<div><input tupe=botton name="Print" value="打印" onclick="prit()"</div>教本如下:
<script language="javascript">
function prit()
{
bdhtml=window.document.body.innerHtml;
strstart="<!-- startprint -->";
strend="<!-- end -->";
prnstr=bdhtml.substr(bdhtml,indexof(strstart)+17)
prnstr=bdhtml.substring(0,prnstr.indexof(strend))
window.document.body.innerHtml=prnstr;
window.print();}
</script>
欢迎使用www.bz2008.com 可以辅助生成大部分的程序代码,注册即可使用
支持所有开发语言和平台
<INPUT onclick="document.getElementById('WebBrowser').ExecWB(7,1)" type="button" value="打印预览">