2010-08-21 75 views

回答

1

使用CSS media規則來隱藏打印的所有其他內容。

E.g.

@media print { 
    #header, #footer, #menu { display: none; } 
} 

你也可以把它放在自己的樣式表文件,並使用

<link rel="stylesheet" href="print.css" media="print" /> 
1

一個有點簡單的例子,沒有字幕錯誤;-)

<h:dataTable value="#{MyBean.myCollection}" var="item"> 
<h:column> 
      <h:outputText value="#{item}"></h:outputText> 
</h:column> 
</h:dataTable>