print() मेथड
JavaScript का उपयोग करके प्रिंट डायलॉग बॉक्स पॉप-अप करने के लिए, print() मेथड का उपयोग करें। डायलॉग बॉक्स के साथ, आप आसानी से प्रिंटिंग विकल्प सेट कर सकते हैं जैसे प्रिंटिंग के लिए कौन सा प्रिंटर चुनना है।
प्रिंट डायलॉग बॉक्स

उदाहरण
<!DOCTYPE html> <html>
<body>
<button onclick="display()">Click to Print</button>
<script>
function display() {
window.print();
}
</script>
</body>
</html>