Skip to content
Advertisement

Auto start print html page using javascript

Is there anyway to automatically run javascript:window.print() when the page finishes loading?

Advertisement

Answer

<body onload="window.print()"> or window.onload = function() { window.print(); }

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement