在包含多个Iframe的页面中分别打印每个iFrame里的src的页面
我有一个print.asp页面,里面分别包含1.asp,2.asp,3.asp.... 的iframe
<iframe id=ifrm height="100%" width="100%" style="display:block" src="1.asp" scrolling="no" frameborder="no" framespacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<% if two = true then %>
<iframe id=ifrm2 height="100%" width="100%" style="display:block" src="2.asp" scrolling="no" frameborder="no" framespacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<% end if %>
<% if three = true then %>
<iframe id=ifrm3 height="100%" width="100%" style="display:block" src="3.asp" scrolling="no" frameborder="no" framespacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<% end if %>
面1.asp,2.asp,3.asp文档的内容是空的.在print.asp里面这样动态写进内容到那几个文档中去:
<script>
document.frames("ifrm").document.all.tab.innerHTML=document.all.tab1.outerHTML;
<% if two = true then %>
document.frames("ifrm2").document.all.tab.innerHTML=document.all.tab2.outerHTML;
<% end if %>
<% if three = true then %>
document.frames("ifrm3").document.all.tab.innerHTML=document.all.tab3.outerHTML;
<% end if %>
</script>
也就是说在print.asp中,分别将tab1,tab2,tab3的内容写进1.asp,2.asp,3.asp中去。在print.asp中,tab1,tab2,tab3是隐藏的,该页就只可以看1.asp,2.asp的内容了。生成后,每个表格都很大的,高度有的不止一张纸打得下的。
现在的问题是:如果我是单独的打印每个1.asp或2.asp,则打印的时候,一张纸的高度打不下的表格内容,会自动打到第二张纸去,但如果我是整个print.asp文档按打印的话,在1.asp或2.asp中的表格里面比一张纸高的部分就不会接着打第二纸了,例如说:第一张纸打印的是1.asp中的表格,但那个表格比纸高,没打完,它不会自动打到第二张纸去,它的第二张纸打印的是2.asp内的表格。这样就打丢了很多东西了,请问这个问题该如何解决?
谢谢!