zoukankan      html  css  js  c++  java
  • html分页打印 每页都有表头

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="a01.aspx.cs" Inherits="a01" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <style>
    @media print{
    INPUT {display:none}
    .Noprint{display:none}
    }
    </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:Label ID="Label1" CssClass="Noprint" runat="server" Text="Label"></asp:Label>
        </div>

       
    <TABLE border="0" style="font-size:9pt;" width="300px" align="center">
    <THEAD style="display:table-header-group">
    <TR><TD colspan="2" align="center" style="font-weight:bold;border:3px double red">每页都有的表头</TD></TR>
    </THEAD>
    <TBODY style="text-align:center"">
    <TR><TD>第一页</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容1</TD></TR>
    <TR><TD>第二页</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>第三页</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR><TD>表格内容</TD><TD>表格内容</TD></TR>
    <TR style="page-break-after:always;"><TD>表格内容</TD><TD>表格内容</TD></TR>
    </TBODY>
    <TFOOT style="display:table-footer-group">
    <TR>
    <TD colspan="2" align="center" style="font-weight:bold;border:3px double blue">每页都有的表尾</TD>
    </TR>
    </TFOOT>
    </TABLE>
    <input type=button value=" 打  印 " onclick="window.print()">

        </form>
    </body>
    </html>

  • 相关阅读:
    MongoDB 处理jumbo chunks警告信息
    MongoDB 3.0挂起原因? WiredTiger实现:一个LRU cache深坑引发的分析
    python3中字符串、整数互转以及转二进制(MAC地址IP地址转二进制方法)
    MongoDB 批量插入避免唯一值重复停掉问题
    MongoDB 3.6用户白名单(转载)
    MongoDB中WiredTiger的数据可用性设置
    Mongodb 新版配置文件详解(转载)
    MongoDB 启动后告警
    MongoDB 安装部署需求(官方文档)
    golang中defer的些许总结
  • 原文地址:https://www.cnblogs.com/zhwl/p/2480729.html
Copyright © 2011-2022 走看看