Source code

Revision control

Copy as Markdown

Other Tools

<!doctype html>
<div id="before-print-count"></div>
<script>
let count = 0;
onload = function() {
window.addEventListener('beforeprint', () => {
document.getElementById("before-print-count").innerText = ++count;
print()
});
print()
};
</script>