demo:
<c:forEach items="${requestScope.resultList}" var="o" varStatus="index">
<tr>
<td>${index.count}</td>
<td><a href="javascript:void(0)" onclick="showEdit('${o.id}')">编辑</td>
</tr>
</c:forEach>
在<head>中加:<object id=factory style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="smsx.cab#Version=6,3,434,26"></object>
<meta name=ProgId content=Excel.Sheet><meta name=Generator content="Microsoft Excel 11">
<style media="print" type="text/css">
.Noprint
{
display: none
}
</style>
在<body>中加:
<input name="print" id="print" type="button" class="Noprint" value="打印" onClick="window.print()">
<input name="print" id="print" type="button" class="Noprint" value="打印预览" onClick="factory.printing.Preview()">
这个会打印出整个jsp页面,不想打印的就设置class="Noprint"。哈,希望有帮助
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)