พอดีว่ามันต้องทำรายงานแบบ html ที่เป็นตารางมีข้อมูลเยอะๆ อยากให้เวลาสั่งพิมพ์หรือปริ๊นท์(print) ข้อมูลมันเกินหน้ากระดาษ header กับ footer ของตารางต้องแสดงด้วยทุกหน้า
(แอบบ่น เขาบอกว่ามีตัวอย่างอยู่แล้ว ไปดูกะจะลอก แต่ใช้ไม่เห็นได้สงสัยจะเขียนไม่ครบ ไม่ง้อหรอก)
in .css
*** ถ้าจะให้มันแสดงเมื่อ print ด้วย อย่าลืม media=”print” นะจ๊ะ
<style type="text/css" media="print,screen" >
th {
font-family:Tahoma;
color:black;
background-color:#DDDDDD;
}
thead {display:table-header-group;}
tbody {display:table-row-group;}
tfoot {display: table-footer-group;}
</style>
in .html
<table border="1" cellpadding="2" cellspacing="0">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>xxxxx</td>
<td>yyyyy</td>
</tr>
</tbody>
</table>