<body onLoad="window.print()">
ou en mettant ce bout de script en début de page entre <head> et </head>
<script language="javascript">
<!--
window.print()
//-->
</script>
console.log(a); // write to the browser console
document.write(a); // write to the HTML
alert(a); // output in an alert box
confirm("Really?"); // yes/no dialog, returns true/false depending on user click
prompt("Your age?","0"); // input dialog. Second argument is the initial value
<body onLoad="window.print()">
ou en mettant ce bout de script en début de page entre <head> et </head>
<script language="javascript">
<!--
window.print()
//-->
</script>
console.log(a); // write to the browser console
document.write(a); // write to the HTML
alert(a); // output in an alert box
confirm("Really?"); // yes/no dialog, returns true/false depending on user click
prompt("Your age?","0"); // input dialog. Second argument is the initial value