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を設定する方法