【发布时间】:2012-08-06 14:19:31
【问题描述】:
<input type= "button" value="Print" onclick="return PrintReport()" class="lbutton"/>
<iframe frameborder="0" height="768px" width="95%" id="loader" src="" name="loader"/>
function PrintReport()
{
document.getElementById('loader').contentWindow.document.execCommand('Print',false,null);
return false;
}
包含 aspx 页面的 iframe 名称加载器(html 表格报告)
点击按钮打印成功但是当我以pdf格式预览时。
然后html 报告缺少它们的边框颜色和背景颜色。
我检查 ie 8 中的设置是否允许背景颜色和图像。
打印后如何获取表格边框颜色和背景颜色。
【问题讨论】:
-
给表格添加内联 CSS 然后检查它。
-
giv 内联 CSS 但打印后不应用背景色
-
在 ie 7 中工作正常,但在 ie 8 中失败
-
然后是上面的代码或什么
标签: javascript asp.net css printing