我的問題: - 我有一個父窗口中的內容它是非常和我顯示的頁面角我想打印頁面的一部分,所以我打開了一個彈出窗口該字體應的22px如何更改彈出窗口中的文本大小
function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var WinPrint = window.open('','','letf=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
<div id="content">
<strong style="font-size:9px">This is the content i am going to print,
but here it is very small font. In this page i have lot of information
so i want to print a part of page. Which is displayed in this div. </strong>
</div>
<input type="button" value="print" onclick="CallPrint(strid)">
我得到了答案,但不工作
也許我誤解了這個問題。您是否嘗試將'font-size:9px'更改爲'font-size:22px'? – erickb 2011-02-28 08:20:45
雅,在父窗口應該是9px,但在彈出窗口我需要22px。 – Navruk 2011-02-28 09:45:23
hello你們中的任何一位PLZ給我這個問題的答案 – Navruk 2011-02-28 09:47:43