[英]Changing background color of HTML Table cell after Javascript Changes it
[英]html table miss their border color and background color after print
<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報告錯過了它們的邊框顏色和背景顏色 。
我檢查即8中的設置允許背景顏色和圖像。
打印后如何獲取表格邊框顏色和背景顏色。
嘗試將內聯CSS用作邊框顏色。
style="border: 5px solid #333"
我無法確定要重新創建您的方案,但是當我無意中“自動關閉”一個iframe元素時,就會發生很多樣式問題。 它不是一個自閉元素。 值得嘗試...
代替 :
<iframe frameborder="0" height="768px" width="95%" id="loader" src="" name="loader"/>
做這個:
<iframe frameborder="0" height="768px" width="95%" id="loader" src="" name="loader"></iframe>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.