JS 打印

function printme(mprint) {
 var print ="<br><br><br>"+this.document.getElementById(mprint).innerHTML;

 var newWindow = window.open("", "newWindow", "height=" + window.screen.height + ",width=" + window.screen.width + ",toolbar=no,scrollbars=auto,menubar=no");
 newWindow.document.open("text/html");
 newWindow.document.write(print);

 newWindow.document.close();
newWindow.window.print();
newWindow.window.close();

} 
 

 

你可能感兴趣的:(js)