打印页面内容
JS: function print(obj) { var newWindowObj = window.open(); var printStr = obj.innerHTML; newWindow.document.write(printStr); newWindow.document.close(); newWindow.print(); newWindow.close(); } html: <button onclick="print(document.getElementById('#Id'))">打印</button>
Js常用功能函数
最新推荐文章于 2022-12-12 20:15:56 发布