button window.print(); code example Example: javascript window.print <button onclick="window.print()">Print this page</button>