我在文字下面有这个来显示我的动态表
<div id="Print">
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</div>
我放置一个图像按钮来打印
<asp:ImageButton ID="ImageButton5" runat="server"
ImageUrl="~/Image/Print_Icon_Design.jpg" Height="25px"
Width="27px" style="margin-left:20px" OnClientClick="CallPrint"/>
我有下面的代码要打印,但它不工作你能帮忙吗
<script language="javascript" type="text/javascript">
function CallPrint(Print) {
var prtContent = document.getElementById(Print);
var WinPrint = window.open('', '', 'left=0,top=0,width=400,height=400,toolbar=0,scrollbars=0,status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
</script>