打印的问题,自定义页眉,页脚是怎么实现的?按照那个设置怎么没用?? http://blog.csdn.net/net_lover/archive/2004/07/06/35228.aspx原来答案在这里,如果谁还有其他的方法,给多人,不然大家进来都有分。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""><Script language="JavaScript">var hkey_root,hkey_path,hkey_keyhkey_root="HKEY_CURRENT_USER"hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"// 设置页眉页脚为空function PageSetup_Null(){ try{ var RegWsh = new ActiveXObject("WScript.Shell") ; hkey_key="header" ; RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"") ; hkey_key="footer" ; RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&p/&P") ; } catch(e){}}// 设置页眉页脚为默认值function PageSetup_Default(){ try{ var RegWsh = new ActiveXObject("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") ; } catch(e){}}// 打印function PrintPage(){ PageSetup_Null() ; window.print() ; PageSetup_Default() ;}</Script></HEAD><BODY>javascript的test page print<br>xxxxxxxxxxx<br>yyyyyyyyyyyyyy<br>kkkkkkkkkkkk<br><a href="#" onClick="PrintPage();">Print Page</a><object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object><input type="button" onClick="document.all.WebBrowser.ExecWB(7,1)" value="打印预览"></BODY></HTML> 请教个js问题。。 判断下载是否完成.................. 求帮我的代码实现不同行颜色不同 用JSP书写树型论坛代码有人懂吗 关于qq-我的好友列表收缩效果? 求教一个关于check的问题,拜托~~ html5和css3中的常用技术是什么啊? 如何使菜单不折行? 下面一小段js 转换成 jquery,谢谢 高手快来拿分 !!!!!!!!!!!!! 表单提交时框架集的问题 如何实现WEB界面窗口可拖拽
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT=""><Script language="JavaScript">var hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"// 设置页眉页脚为空
function PageSetup_Null()
{
try{
var RegWsh = new ActiveXObject("WScript.Shell") ;
hkey_key="header" ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"") ;
hkey_key="footer" ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&p/&P") ;
}
catch(e){}
}// 设置页眉页脚为默认值
function PageSetup_Default()
{
try{
var RegWsh = new ActiveXObject("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") ;
}
catch(e){}
}// 打印
function PrintPage()
{
PageSetup_Null() ;
window.print() ;
PageSetup_Default() ;
}</Script></HEAD><BODY>
javascript的test page print<br>
xxxxxxxxxxx<br>
yyyyyyyyyyyyyy<br>
kkkkkkkkkkkk<br>
<a href="#" onClick="PrintPage();">Print Page</a>
<object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
<input type="button" onClick="document.all.WebBrowser.ExecWB(7,1)" value="打印预览"></BODY>
</HTML>