

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I pop-up a print dialog box using JavaScript?
To pop-up a print dialog box using JavaScript, use the print() method. With the dialog box, you can easily set the printing options like which printer to select for printing.
This is the dialog box −
Example
You can try to run the following code to learn how to print a page −
<!DOCTYPE html> <html> <body> <button onclick="display()">Click to Print</button> <script> function display() { window.print(); } </script> </body> </html>
- Related Questions & Answers
- How I can replace a JavaScript alert pop up with a fancy alert box?
- How do I automatically download files from a pop up dialog using selenium-python?
- How to show prompt dialog box using JavaScript?
- Creating a prompt dialog box using Tkinter?
- Can selenium handle Windows based pop up?
- How can I create a dialog box in Java with Yes No and cancel buttons?
- How I can change the style of alert box using JavaScript?
- How to automate menu box/pop up of right click in Python Selenium?
- How do I make a pop-up in Tkinter when a button is clicked?
- Types of Pop up boxes available in JavaScript
- Raise a "File Download" Dialog Box using Perl
- How to create a Custom Dialog box on iOS App using Swift?
- How to create a Dialog Box without a title in Android using Kotlin?
- How do we define a dialog box in HTML?
- How to create a Confirmation Dialog Box in Java?
Advertisements