1,http://expert.csdn.net/Expert/TopicView2.asp?id=973599&datebasetype=now
2,http://expert.csdn.net/Expert/TopicView2.asp?id=1294743&datebasetype=now
2,http://expert.csdn.net/Expert/TopicView2.asp?id=1294743&datebasetype=now
解决方案 »
- 求个密码的正则表达式
- IE6.0下二级导航正常,但是在谷歌,和IE8下不正常。帮忙看下JS代码。
- 新年快乐, 谁帮帮我
- document.Form1.province 为空或不是对象
- frame之间的变量访问的问题!
- javascript 如何取得 RealPlayer播放时影片的时间长度,以及当前播放的时间……
- jquery-1.4.4.min.js为啥报这个错?
- 各路好汉请进,帮偶看一问题共200分
- 如何控制回车键?
- 关于使用<object>代替<div>做动态菜单的问题,请高手相助
- 如何使一个提交按钮在处理的 onClick 事件后仍具有提交能力?[50分]
- 关于jqgrid的单元格默认值问题
http://expert.csdn.net/Expert/topic/1428/1428024.xml?temp=.6602747
<HTML><HEAD>
<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>
<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,"")
}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 to_print()
{
pagesetup_null();
document.all.to_print.style.display="none";
document.all.to_review.style.display="none";
document.all.WebBrowser.ExecWB(6,6);
document.all.to_print.style.display="";
document.all.to_review.style.display="";
}
</script>
</HEAD><BODY><br/><br/><br/><br/><br/><br/><p align=center>
<input type="button" name="to_print" value="打印" onclick="to_print()">
<input type="button" name="to_review" value="恢复页码" onclick="pagesetup_default()"><br/>
</p></BODY></HTML>