<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;
}
iframe名称为loader,包含aspx页面(HTML表格报告)
点击按钮打印成功,但在PDF格式中预览时,HTML报告缺少边框颜色和背景颜色。
我检查了IE 8中的设置,允许背景颜色和图像。
如何在打印后获取表格边框颜色和背景颜色。