Archive for May, 2017

Print Html page using javascript in

function printpage() {
//Get the print button and put it into a variable
var printButton = document.getElementById(“printbtn”);
//Set the print button visibility to ‘hidden’ = ‘hidden’;
//Print the page content
//Set the print button to ‘visible’ again
//[Delete this line if you want it to stay hidden after printing] = ‘visible’;


<input id=”printbtn” type=”button” value=”Print page” onclick=”printpage()”/>