如何在打印时在每页上设置漫反射页脚? [英] how to set diffrant footer on each page while printing?
本文介绍了如何在打印时在每页上设置漫反射页脚?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i有很多页要打印,还有两个不同的页脚。
喜欢 -
//页脚1
footer1 | footer1 |
footer1 | footer1 |
//页脚2
footer2 | footer2 |
footer2 | footer2 |
我尝试在所有页面上打印页脚1,但只有最后一页我要打印页脚2.
打印页面是dinamically genere。
anybdy plz help。 ...
解决方案
为什么不给< footer>一个id,然后当你到达最后一页时使用DOM替换对象的innerHTML。
例如,如果你的使用
< script type = text / javascript >
< 页脚 id = xx >
document.getElementById('xx' ).innerHTML ='Hello From The New Footer!';
< / footer >
< / script >
dear sir,
i have so many pages to print, and two diffrant footers.
like-
//footer 1
footer1 | footer1 |
footer1 | footer1 |
//footer 2
footer2 | footer2 |
footer2 | footer2 |
I try to print footer 1 on all pages but only last page i want to print footer 2.
printing pages are dinamically genereted.
anybdy plz help....
解决方案
Why not give the <footer> an id, then use the DOM to replace the innerHTML for the object when you reach the last page.
for example, if your use
<script type="text/javascript"> <footer id="xx"> document.getElementById('xx').innerHTML = 'Hello From The New Footer!'; </footer> </script>
这篇关于如何在打印时在每页上设置漫反射页脚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文