Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>本教程(w3big.com)</title> <script> function setPageBreak(){ document.getElementById("footer").style.pageBreakAfter="always"; } </script> </head> <body> <h1>这是个标题</h1> <p>这是一个段落</p> <p id="footer">这是底部段落</p> <button type="button" onclick="setPageBreak()">设置底部段的后一页</button> <p>单击上面的按钮查看打印或打印预览的变化。</p> </body> </html>