我在正確打印DIV content.it打印出它像undefined..can任何一個「SYS」的錯誤告訴我解決的問題,Sys系統的打印功能未定義
<div id="mydiv" runat="server" style="display:none;">
</div>
和我的JavaScript :
function Print() {
var PrintDiv = $('#' + '<%= mydiv.ClientID %>').html();
//var NewWindow = window.open('', '', 'width=500,height=500');
var NewWindow = window.open('', '_blank', 'location=1,status=1,scrollbars=1,width=1000,height=700');
NewWindow.document.open("text/html");
NewWindow.document.write('<html><head><title></title>');
NewWindow.document.write('<link href="CSS/style.css" rel="stylesheet" type="text/css" />');
NewWindow.document.write('</head><body onload="window.print()">');
NewWindow.document.write(PrintDiv);
NewWindow.document.write('</body></html>');
NewWindow.document.close();
}
是,,但它顯示錯誤消息Sys系統未定義 – 2013-03-12 06:24:19
可以調試,讓我知道這行的投擲的錯誤。 – 2013-03-12 06:29:26
我得到錯誤var PrintDiv = $('#'+'ctl00_ContentPlaceHolder1_mydiv')。innerHtml(); – 2013-03-12 06:33:41