1.效果图: <body> <div>将被打印的内容</div> <button onclick="printContent()">打印</button> <script> function printContent() { window.print() } </script> </body>