打印面板到多页 [英] print panel to multiple pages
本文介绍了打印面板到多页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有40个图片框的面板.图片按8行x 5列垂直排列.我想将面板的内容打印到A4纸上.请帮忙.
在此先感谢
Janardhan
Hi,
I have a panel with 40 picture boxes. The pictures are arranged in 8 rows x 5 cols vertically. I want to print the contents of the panel into A4 sheets. Kindly help.
Thanks in advance
Janardhan
推荐答案
在下面使用此代码:
Use this code below :
function callPrint(ctrId)
{
var prtContent = document.getElementById(ctrId);
var winPrint = window.open('''','''',''left=0,top=0,width=1,height=1
,toolbar=0,scrollbars=0,status=0'');
winPrint.document.write(prtContent.innerHTML);
winPrint.document.close();
winPrint.focus();
winPrint.print();
winPrint.close();
}
只需调用javascript方法,它将打印ID为ctrId的div的内容.
:rose:
Just call the javascript method, it will print the content of the div of id ctrId.
:rose:
这篇关于打印面板到多页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文