0
私はJavaScriptでフォーム(asp:panel)を印刷しようとしています。しかし、私は2つの問題があります。JavaScript // Inner Htmlフォームビューを失う
1)印刷ボタンを押すと、フォームのスタイルが失われます。 (それはaspPanel.InnerHtmlで来ています)
2)ページサイズは印刷ページによって決まります。 (行がページに収まらない場合は、他のページに渡してください)
私はスクリーンショットで投稿しています。アイデア?
function PrintForm()
{
var formpanel = document.getElementById("<%= QuestForm.ClientID%>");
var mainWindow = window.open('', '', 'height=500,width=800');
mainWindow.document.write('<html><head><title>Adapazarı</title>');
mainWindow.document.write('<head/><body>');
mainWindow.document.write(formpanel.innerHTML);
mainWindow.document.write('</body></html>');
mainWindow.document.close();
setTimeout(function() {
mainWindow.print();
}, 500);
return false;
}
。 (また、私はタグでスタイルを使用する)まだプリントウィンドウ上の私の要素の間にスペースがあります。 –
'