惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Vercel News
Vercel News
L
LangChain Blog
B
Blog RSS Feed
Y
Y Combinator Blog
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
V
V2EX
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
D
Docker
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
月光博客
月光博客

博客园 - 刺猬博客

利用javascript验证各种格式 通用高效分页存储过程代码 Asp.Net中使用水晶报表 SmartPager: a Flickr-style pager control with go-to-page popup layer Linux/UNIX 命令行大全完整版 分页存储过程 不可小瞧的using关键字 常用JS加密编码算法 安全验证码,简单加减法运算,机器无法识别的验证码 让你哈哈一下 中文汉字生成拼音 添加了代码着色的最新fckEditor 2.5.1 职场有多少IT精英透支健康和生命? 中国38%的IT从业人员靠微软生态系统生存 两个分页存储过程 仿163邮箱的alert提示,beta1.1 使用WebDeployment Project改善VS2005发布网站问题 (一) 基础 国外公司的大气与腾讯的小气 仿163信箱的alert提示,带效果预览图
用JS去掉打印的页眉页脚
刺猬博客 · 2007-09-17 · via 博客园 - 刺猬博客

<script language="JavaScript">
var hkey_key;
var hkey_root="HKEY_CURRENT_USER";
var hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
//设置网页打印的页眉页脚为空
function pagesetup_null()
{    

    
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,"");

}


//设置网页打印的页眉页脚为默认值
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){}
}

</script>