asp.net中table的背景颜色无法打印出来? <div style="display:none; width: 1022px;" id="printPerList">
<div style=" width:1024px; height:20px;"></div>
<div style=" width:1014px; height:90px; float:left;">
<table cellpadding="0"; cellspacing="0"; style=" border:1px solid black; text-align:left;">
<tr style=" height:30px; ">
<td style=" width:35px; border-right:1px solid black;border-bottom:1px solid black;">总计</td>
<td style=" width:295px; border-right:1px solid black; background-color:Gray;"> </td>
<td style=" width:60px; border-right:1px solid black;border-bottom:1px solid black;">A=</td>
<td style=" width:50px; border-right:1px solid black;border-bottom:1px solid black;">C=</td>
<td style=" width:50px; border-right:1px solid black;border-bottom:1px solid black;">E=</td>
<td style=" width:65px; border-right:1px solid black;border-bottom:1px solid black;">G=</td>
<td style=" width:65px; border-right:1px solid black;border-bottom:1px solid black;">I=</td>
<td style=" border-right:1px solid black; border-bottom:1px solid black; width: 85px;" >K=</td>
<td style=" border-right:1px solid black;border-bottom:1px solid black; width:55px;"> </td>
<td style=" border-right:1px solid black;border-bottom:1px solid black;width:55px;"> </td>
<td style=" width:2px; border-right:1px solid black; border-bottom:1px solid black;width:55px;">
</td>
<td style=" width:24px;border-bottom:1px solid black;"> </td>
</tr>
<tr style=" height:30px;">
<td style=" width:35px; border-right:1px solid black; border-bottom:1px solid black;">平均</td>
<td style=" width:295px; border-right:1px solid black; background-color:Gray; "> </td>
<td style=" width:60px; border-right:1px solid black; border-bottom:1px solid black;">B=</td>
<td colspan=4 style=" width:240px; border-right:1px solid black; background-color:Gray; border-bottom:1px solid black; "> </td>
<td style=" border-right:1px solid black; border-bottom:1px solid black; width: 85px;" >L=</td>
<td colspan=3 style=" width:180px; border-right:1px solid black;background-color:Gray; border-bottom:1px solid black; ">
</td>
<td style=" width:74px;background-color:Gray; border-bottom:1px solid black;"> </td>
</tr>
<tr style=" height:30px; ">
<td style=" width:35px; border-right:1px solid black;">%</td>
<td style=" width:295px; border-right:1px solid black; background-color:Gray;"> </td>
<td style=" width:60px; border-right:1px solid black;"> </td>
<td style=" width:60px; border-right:1px solid black;">D=</td>
<td style=" width:60px; border-right:1px solid black;">F=</td>
<td style=" width:60px; border-right:1px solid black;">H=</td>
<td style=" width:60px; border-right:1px solid black;">J=</td>
<td colspan=4 style=" width:300px; border-right:1px solid black;background-color:Gray; ">
</td>
<td style=" width:74px; background-color:Gray;"> </td>
</tr>
</table>
</div>
</div>//打印
function printPage(naem) {
var newWindow = window.open('printer.html', '', '');
var titleHTML = document.getElementById(naem).innerHTML;
newWindow.document.write(titleHTML);
newWindow.document.location.reload();
newWindow.print();
}
js打印的时候,背景颜色总是打印不出来,internet工具>高级>打印背景颜色和图像,这个设置我也设了。还是打印不出来,各位高手这个问题怎么解决?
<div style=" width:1024px; height:20px;"></div>
<div style=" width:1014px; height:90px; float:left;">
<table cellpadding="0"; cellspacing="0"; style=" border:1px solid black; text-align:left;">
<tr style=" height:30px; ">
<td style=" width:35px; border-right:1px solid black;border-bottom:1px solid black;">总计</td>
<td style=" width:295px; border-right:1px solid black; background-color:Gray;"> </td>
<td style=" width:60px; border-right:1px solid black;border-bottom:1px solid black;">A=</td>
<td style=" width:50px; border-right:1px solid black;border-bottom:1px solid black;">C=</td>
<td style=" width:50px; border-right:1px solid black;border-bottom:1px solid black;">E=</td>
<td style=" width:65px; border-right:1px solid black;border-bottom:1px solid black;">G=</td>
<td style=" width:65px; border-right:1px solid black;border-bottom:1px solid black;">I=</td>
<td style=" border-right:1px solid black; border-bottom:1px solid black; width: 85px;" >K=</td>
<td style=" border-right:1px solid black;border-bottom:1px solid black; width:55px;"> </td>
<td style=" border-right:1px solid black;border-bottom:1px solid black;width:55px;"> </td>
<td style=" width:2px; border-right:1px solid black; border-bottom:1px solid black;width:55px;">
</td>
<td style=" width:24px;border-bottom:1px solid black;"> </td>
</tr>
<tr style=" height:30px;">
<td style=" width:35px; border-right:1px solid black; border-bottom:1px solid black;">平均</td>
<td style=" width:295px; border-right:1px solid black; background-color:Gray; "> </td>
<td style=" width:60px; border-right:1px solid black; border-bottom:1px solid black;">B=</td>
<td colspan=4 style=" width:240px; border-right:1px solid black; background-color:Gray; border-bottom:1px solid black; "> </td>
<td style=" border-right:1px solid black; border-bottom:1px solid black; width: 85px;" >L=</td>
<td colspan=3 style=" width:180px; border-right:1px solid black;background-color:Gray; border-bottom:1px solid black; ">
</td>
<td style=" width:74px;background-color:Gray; border-bottom:1px solid black;"> </td>
</tr>
<tr style=" height:30px; ">
<td style=" width:35px; border-right:1px solid black;">%</td>
<td style=" width:295px; border-right:1px solid black; background-color:Gray;"> </td>
<td style=" width:60px; border-right:1px solid black;"> </td>
<td style=" width:60px; border-right:1px solid black;">D=</td>
<td style=" width:60px; border-right:1px solid black;">F=</td>
<td style=" width:60px; border-right:1px solid black;">H=</td>
<td style=" width:60px; border-right:1px solid black;">J=</td>
<td colspan=4 style=" width:300px; border-right:1px solid black;background-color:Gray; ">
</td>
<td style=" width:74px; background-color:Gray;"> </td>
</tr>
</table>
</div>
</div>//打印
function printPage(naem) {
var newWindow = window.open('printer.html', '', '');
var titleHTML = document.getElementById(naem).innerHTML;
newWindow.document.write(titleHTML);
newWindow.document.location.reload();
newWindow.print();
}
js打印的时候,背景颜色总是打印不出来,internet工具>高级>打印背景颜色和图像,这个设置我也设了。还是打印不出来,各位高手这个问题怎么解决?
解决方案 »
- org.in2bits.myxls 怎么设置行高
- 不显示删除回复显示所有回复显示星级回复显示得分回复 添加了一个存储过程后SqlServer持续占用cpu80%
- 正则表达式(huangwenquan123)
- 我在本地写好的asp.net网站,怎么培植到空间上面啊?
- 正则表达式匹配图片地址
- js 的问题
- 如果想URL传递多个参数,那么在DataGrid里怎么设置呢?
- 这样的事件调用怎么写?
- mongodb 分页查询 需要自动增加ID吗? 求高手指点
- datagrid中如何绑定和读取嵌入的html控件?
- C# .net 如何区分同ip下的多台主机(包括电脑的ip,访问路径,端口等)
- 请教请教!!!
用这个table的样式:
<table style='BORDER-COLLAPSE: collapse;' borderColor='black' border='1' bgcolor=#dddddd>(tr的背景色设为#ffffff)代替看看。
其他浏览器也类似.
不知道是不是楼主想要的,如果是了请赶快结帖!