1
function printData()
{
var divToPrint=document.getElementById("myprinttd");
document.getElementById("myprinttd").style.fontSize = "2px";
newWin= window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
}
我正在使用上面的函數來打印屏幕。我想要減小字體大小並減少數據之間的空白,但我不能。任何人都可以幫忙。在此先感謝如何在javascript print()函數中設置fontsize