当前位置:编程学习 > JAVA >>

html页面报表打印第二页带表头要怎么做

打印界面如下:
function printdiv(){
var newWindow=window.open("<%=request.getContextPath()%>/admin/report/report","_blank");  
var newstr = document.all.item('div_print').innerHTML;
newstr = newstr.replace("auto","");
newstr = newstr.replaceAll("left","none");
newstr = newstr.replaceAll("border=0","border=1");
newstr = newstr.replaceAll("onfocus","readonly=\"true\" onfocus");
newstr = newstr.replaceAll("13px;","16px;");
newWindow.document.write(newstr); 
newWindow.document.getElementById("button1").style.display ="none"; 
newWindow.document.getElementById("button2").style.display ="none";  
newWindow.document.getElementById("select1").disabled="true";
newWindow.document.close();  
newWindow.print();  
   }
形成的效果:

因为有三种表,并且每张表的记录条数不是固定的,要求第二页以后最开始都得有表头,就是比如第二张表的数据超过第一页到第二页了那么第二页应该有第二张表的表头,做了一个星期了,还是没头绪,求帮忙。
补充:Java ,  Java相关
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,