0
我正在使用以下代码打印ASPX网页。它正在工作。但样式表不适用于此模板。请帮助我将样式应用于打印页面。样式不适用于使用javascript的打印页面
<script language="javascript">
function printpr() {
var panel = document.getElementById("<%= all.ClientID %>");
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<link rel="stylesheet" type="text/css" href="style.css" media="print"/>\n')
printWindow.document.write(panel.innerHTML);
printWindow.document.close();
setTimeout(function() {
printWindow.print();
}, 500);
return false;
}
</script>