下面的代码通过一个JS按钮控制打印机打印当前页面
<!DOCTYPE html> <html> <head> <script> function printpage() { window.print(); } </script> </head> <body> <input type="button" value="Print this page" onclick="printpage()" /> </body> </html>
下面的代码通过一个JS按钮控制打印机打印当前页面
<!DOCTYPE html> <html> <head> <script> function printpage() { window.print(); } </script> </head> <body> <input type="button" value="Print this page" onclick="printpage()" /> </body> </html>