打印~~
来源:互联网 发布:程序员十大软件 编辑:程序博客网 时间:2024/06/02 16:38
print.js
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,"");hkey_key="margin_bottom";RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"1"); //0.39相当于把页面设置里面的边距设置为10hkey_key="margin_top";RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"1");hkey_key="margin_left";RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"0.2"); hkey_key="margin_right";RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"0.2");}function openPrint(){pagesetup_null();document.all.WebBrowser.ExecWB(7,1)//document.all.WebBrowser.ExecWB(6,1);}
<style type="text/css" media=print>.Noprint{display:none;} .PageNext{page-break-after: always;} </style>
<div align="center" style="padding-top:8px;" class="Noprint"><a href="javascript:print()" class="list_button2" id="打印" >打 印</a></div>
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印
- 打印。。。。。
- 打印
- 打印
- 打印!
- 打印
- 几种影响晋升的不良工作习惯
- sql server 创建角色,用户,权限
- HTML5基础,第1部分:初试锋芒
- HTML5基础,第2部分:组织页面的输入
- HTML5基础,第3部分:HTML5 API的威力
- 打印~~
- log4j输出多个自定义日志文件,动态配置路径
- Linux下载工具Curl详解
- HTML5基础,第4部分:点睛之笔Canvas
- 使用 HTML5 和 CSS3 创建现代 Web 站点
- delphi 访问有登陆密码的局域网电脑文件
- 开发者必须知道的HTML5十五大新特性
- MS题目-hby
- 在GridView中使用FindControl