0
点赞
收藏
分享

微信扫一扫

JS 打印

RIOChing 2023-02-17 阅读 106


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();

}

 


举报

相关推荐

0 条评论