JSFiddle - React, Tailwind, and code Playground
by Jatin46
HTML
<button onclick="printWindow()">Print</button>
<p id="time"></p>
JavaScript
setInterval(function () {
var timeDocument = document.getElementById("time");
var millisecond = new Date().getMilliseconds();
timeDocument.innerHTML = millisecond;
}, 100);
function printWindow() {
var win = window.open('', '_blank');
win.print();
}