我想打開一個新的窗口,它同時包含面板打印爲...如何打印(在新窗口)兩個特定的面板ID
嗨,妳? 我很好.. !!
我使用這個腳本打印在頭部
<head>
<scripttype="text/javascript">
functionPrintPanel() {
var panel = document.getElementById("<%=Pa1.ClientID%>");
varprintWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head><title>DIV Contents</title>');
printWindow.document.write('</head><body >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function() {
printWindow.print();
}, 500);
returnfalse;
}
</script>
</head>
在身體的一部分我有
<body>
<asp:ImageButtonID="print_btn"runat="server"
ImageUrl="~/images/awards2.jpg"OnClientClick="return
PrintPanel();"Height="50"Width="50"/>
<asp:Panel ID="Pa1" runat="server">Hi, How are u?</asp:Panel>
<asp:Panel ID="Pa2" runat="server">I am fine..!!</asp:Panel>
</body>
通過這一點,我將只得到「嗨,ü?」打印,但我想「嗨,你好嗎?我很好.. !!」.....
不要ü想展示什麼是有在面板上的一個新窗口? – 2013-05-09 11:55:05
我認爲你需要讓你的問題更清晰。 – 2013-05-09 11:56:12
@MicrosoftPS:是的。但也必須做它的紙張印刷...... – 2013-05-09 11:57:09