<script type="text/javascript">
function printpreview() {
try {
var HKEY_Root, HKEY_Path, HKEY_Key;
HKEY_Root = "HKEY_CURRENT_USER";
HKEY_Path = "\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
var Wsh = new ActiveXObject("WScript.Shell");
HKEY_Key = "header";
Wsh.RegWrite(HKEY_Root + HKEY_Path + HKEY_Key, "");
HKEY_Key = "footer";
Wsh.RegWrite(HKEY_Root + HKEY_Path + HKEY_Key, "");
}
catch (e) {
}
}
function printerDiv(printpage) {

var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.all.item(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr + newstr + footstr;
window.print();
document.body.innerHTML = oldstr;
printpreview();
return;
}
</script>
<div class="main_content">
<div class="bread_crumbs">
<a href="#"><span class="home_icon"></span>首页</a>&nbsp; > &nbsp;<label>订单管理</label></div>
<div style="margin-top: 20px; margin-left: 20px; font-size: 20px; color: Black; font-weight: bold;">
<a onclick="printerDiv('content')" style="cursor: hand; cursor: pointer;">打 印 </a>
</div>

打印print的更多相关文章

  1. 打印 PRINT

    打印 PRINT 字符串和数值类型 可以直接输出. print(1) #out:1 print('a') #out:a 变量 无论什么类型,数值,字符串,列表,字典...都可以直接输出 n = 1 s ...

  2. 打印-print.js

    //打印开始// strPrintName 打印任务名// printDatagrid 要打印的datagridfunction CreateFormPage(ctx,strPrintName, pr ...

  3. HTML打印print

    上代码: //打印 function printme() { global_Html = document.body.innerHTML; //document.body.innerHTML = do ...

  4. 【C】数据类型和打印(print)

    char -128 ~ 127 (1 Byte) unsigned char 0 ~ 255 (1 Byte) short -32768 ~  32767 (2 Bytes) unsigned sho ...

  5. 解析大型.NET ERP系统 单据标准(新增,修改,删除,复制,打印)功能程序设计

    ERP系统的单据具备标准的功能,这里的单据可翻译为Bill,Document,Entry,具备相似的工具条操作界面.通过设计可复用的基类,子类只需要继承基类窗体即可完成单据功能的程序设计.先看标准的销 ...

  6. python爬虫中文网页cmd打印出错问题解决

    问题描述 用python写爬虫,很多时候我们会先在cmd下先进行尝试. 运行爬虫之后,肯定的,我们想看看爬取的结果. 于是,我们print... 运气好的话,一切顺利.但这样的次数不多,更多地,我们会 ...

  7. C#用 excel 作为模板打印

    //打印操作,套打.打印.预览        enum PrintFlag        {            /// <summary>            /// 套打,只打印没 ...

  8. Objective-C与Swift下的自定义打印函数(Debug和Release)

    1.Objective-C 在使用Objective-C进行开发的过程中,为了Debug会不断的设置打印函数.如下图是我们经常用的,用来测试监听方法的实现与否: NSLog(@"%s&quo ...

  9. 在react中实现打印功能

    最近项目中,前端采用react+antd+dva的组合,已经完成了后头管理类系统产品的更新迭代工作. 今天有一个新需求,需要在后台管理系统中实现点击打印完成指定页面的打印功能. 之前也没接触过,只知道 ...

随机推荐

  1. java将office文档pdf文档转换成swf文件在线预览

    第一步,安装openoffice.org openoffice.org是一套sun的开源office办公套件,能在widows,linux,solaris等操作系统上执行. 主要模块有writer(文 ...

  2. c#语音报时(含完整的声音资源文件).rar

    private void btnBaoshi_Click(object sender, EventArgs e) { try { System.Threading.Thread thread = ne ...

  3. SqlDataAdapter怎么处理事务呢

    SqlDataAdapter怎么处理事务呢,没找到相关代码,哪位朋友能提供下   解决方案 » this._DBAdpt-------------SqlDataAdapterthis._DBConn- ...

  4. 报错:java.lang.IllegalStateException: Cannot call sendError() after the response has been committed(待解答)

    严重: Servlet.service() for servlet [default] in context with path [/20161101-struts2-1] threw excepti ...

  5. [zsh]zsh常用小技巧

    文章来源http://yijiebuyi.com/blog/3154040ae0aa3d352c61a10f2664591e.html shell基础: 查看当前使用shell类型: ->ech ...

  6. 71. Simplify Path

    Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", ...

  7. 如何实现一个malloc

    任何一个用过或学过C的人对malloc都不会陌生.大家都知道malloc可以分配一段连续的内存空间,并且在不再使用时可以通过free释放掉.但是,许多程序员对malloc背后的事情并不熟悉,许多人甚至 ...

  8. c fopen文件读写

    fopen <cstdio> FILE * fopen ( const char * filename, const char * mode ); Open file Opens the ...

  9. Filter实现全站违法关键词屏蔽

    思路:客户端请求服务器数据,经过Filter过滤(请求放行,响应拦截),服务器向客户端返回数据时,在Filter中修改掉返回数据中违法的部分. 修改服务器的响应需要自定义一个HttpServletRe ...

  10. PLSQL_性能优化系列08_Oracle Insert / Direct Insert性能优化

    2014-09-25 Created By BaoXinjian