<!--Include JQuery header file -->
<!--prin script put it in end of the body -->
<script type="text/javascript">
$(document).ready()
{
function printData() {
//alert(1);
var divToPrint = document.getElementById("PrintelementID");
newWin = window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
}
//btnPrint button id
$('#btnPrint').on('click', function () {
printData();
})
}
</script>
<!--prin script put it in end of the body -->
<script type="text/javascript">
$(document).ready()
{
function printData() {
//alert(1);
var divToPrint = document.getElementById("PrintelementID");
newWin = window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
}
//btnPrint button id
$('#btnPrint').on('click', function () {
printData();
})
}
</script>
No comments:
Post a Comment