If you want to print same page then just write the javascript.
function print() {
window.print();
}
if you want to print another webpage from the current page then write below scrpt
function print(var str) {
printWindow = window.open( str,"mywindow");
setTimeout('printWindow.print()', 3000);
setTimeout('printWindow.close()', 3000);
}
function print() {
window.print();
}
if you want to print another webpage from the current page then write below scrpt
function print(var str) {
printWindow = window.open( str,"mywindow");
setTimeout('printWindow.print()', 3000);
setTimeout('printWindow.close()', 3000);
}