HLJ 发布于
2018-08-08 16:57:09

JavaScript打印函数window.print()在执行时打印当前网页

JavaScript打印函数window.print()在执行时打印当前网页
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>window.print</title>
<script type="text/javascript">
       function printpage(){
         window.print();
       }
</script>
</head>
<body>
     <button onclick="printpage()">打印</button>
</body>
</html>

当前文章内容为原创转载请注明出处:http://www.good1230.com/detail/2018-08-08/42.html
最后生成于 2024-05-27 22:52:29
此内容有帮助 ?
0