简体   繁体   English

如何在Google Chrome浏览器中使用JavaScript显示窗口打印对话框?

[英]How can I show the window print dialog using JavaScript in Google Chrome?

I'm using JavaScrpt window.print() function to print out the document. 我正在使用JavaScrpt window.print()函数打印出文档。 But here is a problem in Google Chrome when window.print() function is run it shows the Chrome print dialog not window print dialog. 但是当运行window.print()函数时,这是Google Chrome中的问题,它显示的是Chrome打印对话框而不是窗口打印对话框。 How can I show the window print dialog in Google Chrome? 如何在Google Chrome浏览器中显示窗口打印对话框?

It is behaving correctly see this for more information. 可以正确查看此信息以获取更多信息。

The window object represents an open window in a browser. 窗口对象代表浏览器中打开的窗口。

If a document contain frames ( tags), the browser creates one window object for the HTML document, and one additional window object for each frame. 如果文档包含框架(标签),则浏览器将为HTML文档创建一个窗口对象,并为每个框架创建一个其他窗口对象。

source. 资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Google Chrome中使用JavaScript显示窗口打印对话框 - show the window print dialog using JavaScript in Google Chrome 使用JavaScript和Google Chrome创建并打开新窗口和打印图像 - Create and Open new Window and Print Images using JavaScript and Google Chrome 我们可以使用javascript控制chrome中的打印对话框吗 - Can we control the print dialog box in chrome using javascript 在Google Chrome浏览器中,如何使用父窗口中的javascript将现有的弹出窗口置于最前面? - In Google Chrome, how do I bring an existing popup window to the front using javascript from the parent window? 如何在没有第二个 window 的情况下打开打印对话框? - How can I open a print dialog without a second window? 从桌面图标启动时,是否可以使用JavaScript在Google Chrome浏览器中关闭窗口? - Can I make a window close in Google Chrome using javascript when launched from a desktop icon? 如何在 Google Chrome JavaScript 控制台中打印调试消息? - How do I print debug messages in the Google Chrome JavaScript Console? 如何使用chrome扩展单击对话框窗口 - how to click the dialog window using chrome extention 如何以 python 中的形式显示谷歌浏览器 window? - how to show google chrome window in a form that in python? 如何使用API​​关闭Google Chrome窗口中的所有标签 - How I can close all tabs in Google Chrome window using API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM