print() 方法用于打印当前窗口的内容。
调用 print() 方法所引发的行为就像用户单击浏览器的打印按钮。通常,这会产生一个对话框,让用户可以取消或定制打印请求。
</>code
- window.print()
</>code
- <html>
- <head>
- <script type="text/javascript">
- function printpage()
- {
window.print()
- }
- </script>
- </head>
- <body>
- <input type="button" value="Print this page"
- onclick="printpage()" />
- </body>
- </html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号