Thursday, January 24, 2019

Print HTML by ID

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {  
$("#btn_print").on("click", function () {
printData();
})
});

function printData() {
var divToPrint = document.getElementById("grdlist"); 
newWin = window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
} 
</script>

No comments:

Post a Comment

Convert 1.25x speed spent hours convert into normal (1x) speed spent hours

If I run a video with 1.25x or 125% speed till 1 hour 26 minuts, then normal hours will be ?   1 hours 26 minuts convert into hours Total 60...