jsp中的怎么实现打印table表格中的内容啊?? !!!!!!!!

yesterday_heng 2004-10-30 04:15:31
求大家了,谁能够指点下先~
...全文
602 16 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
qmei 2005-06-08
  • 打赏
  • 举报
回复
http://www.fcsoft.com.cn/eprint/index.htm
dreamyxcy 2005-05-27
  • 打赏
  • 举报
回复
大海之子的方法可行

debug148 2004-11-09
  • 打赏
  • 举报
回复
ding
javatool 2004-11-09
  • 打赏
  • 举报
回复
可以试试JavaCellReport, http://www.javatoolsoft.com
clearwater21cn 2004-11-01
  • 打赏
  • 举报
回复
可以在打印的时候把不需要打印的地方先隐藏起来,打印后再显示出来。
id.style.display='none';
windows.print();
id.style.display='block';
funcreal 2004-11-01
  • 打赏
  • 举报
回复
如果只打表格内容,可以单独做一页不分页的,然后占满整个页面,专门的打印版本.很多网站都是这样做的
风斧 2004-10-31
  • 打赏
  • 举报
回复
mark
yesterday_heng 2004-10-31
  • 打赏
  • 举报
回复
我用的是windows 2000 professsionnal 和IE
ameny 2004-10-30
  • 打赏
  • 举报
回复
你用的是98吧,还有,你是不是用IE来调试的啊!!!!!!!

我用Windows 2000 Server和Mozilla浏览器就没这个问题!!!!!!
yesterday_heng 2004-10-30
  • 打赏
  • 举报
回复
还有一个问题就是用上面的javascript代码实现打印的时候,为什么老是浏览器提示什么当前页面下的activX控件不安全,禁止使用啊,???这样让我无法打印啊,还有我是在jsp中调用的这个打印??
ameny 2004-10-30
  • 打赏
  • 举报
回复
对啊,我也试过了,是全部打印出来,而不是"第1页 这样的报表 对一般的要求就够了。",它会把"第2页 看到分页了吧 这样的报表 对一般的要求就够了。"一起打印出来!!!





yesterday_heng 2004-10-30
  • 打赏
  • 举报
回复
我只需要打印页面的某一个表格的内容啊
yesterday_heng 2004-10-30
  • 打赏
  • 举报
回复
这样打印会把把全部的页面都打出来啊!!!!???
应该怎么处理呢??
orant 2004-10-30
  • 打赏
  • 举报
回复
javascript是可以实现的不错的选择
ydh1981 2004-10-30
  • 打赏
  • 举报
回复
<!--摘自ASP.NET版块 作者: FlashElf (闪) ,特声明,与大家共享-->
<!--语言无关 保存成 .HTML 看看,Web打印,极简单实现 -->
<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<title>看看</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--media=print 这个属性可以在打印时有效-->
<style media=print>
.Noprint{display:none;}
.PageNext{page-break-after: always;}
</style>

<style>
.tdp
{
border-bottom: 1 solid #000000;
border-left: 1 solid #000000;
border-right: 0 solid #ffffff;
border-top: 0 solid #ffffff;
}
.tabp
{
border-color: #000000 #000000 #000000 #000000;
border-style: solid;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 1px;
border-left-width: 1px;
}
.NOPRINT {
font-family: "宋体";
font-size: 9pt;
}

</style>

</head>

<body >
<center class="Noprint" >
<p>
<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>
</OBJECT>
<input type=button value=打印 onclick=document.all.WebBrowser.ExecWB(6,1)>
<input type=button value=直接打印 onclick=document.all.WebBrowser.ExecWB(6,6)>
<input type=button value=页面设置 onclick=document.all.WebBrowser.ExecWB(8,1)>
</p>
<p> <input type=button value=打印预览 onclick=document.all.WebBrowser.ExecWB(7,1)>
<br/>
</p>
<hr align="center" width="90%" size="1" noshade>
</center>

<table width="90%" border="0" align="center" cellpadding="2" cellspacing="0" class="tabp">
<tr>
<td colspan="3" class="tdp">第1页</td>
</tr>
<tr>
<td width="29%" class="tdp"> </td>
<td width="28%" class="tdp"> </td>
<td width="43%" class="tdp"> </td>
</tr>
<tr>
<td colspan="3" class="tdp"> </td>
</tr>
<tr>
<td colspan="3" class="tdp"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" class="tdp"><p>这样的报表</p>
<p>对一般的要求就够了。</p></td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<hr align="center" width="90%" size="1" noshade class="NOPRINT" >
<!--分页-->
<div class="PageNext"></div>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="0" class="tabp">
<tr>
<td class="tdp">第2页</td>
</tr>
<tr>
<td class="tdp">看到分页了吧</td>
</tr>
<tr>
<td class="tdp"> </td>
</tr>
<tr>
<td class="tdp"> </td>
</tr>
<tr>
<td class="tdp"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" class="tdp"><p>这样的报表</p>
<p>对一般的要求就够了。</p></td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
funcreal 2004-10-30
  • 打赏
  • 举报
回复
使用打印机打印吗?

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧