Categories
JavaScript Answers

How to show a pop-up print dialog box using JavaScript?

Spread the love

Sometimes, we want to show a pop-up print dialog box using JavaScript.

In this article, we’ll look at how to show a pop-up print dialog box using JavaScript.

How to show a pop-up print dialog box using JavaScript?

To show a pop-up print dialog box using JavaScript, we can use the window.print method.

For instance, we write

window.print();  

to open the print dialog box of the browser.

Conclusion

To show a pop-up print dialog box using JavaScript, we can use the window.print method.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *