一个JS打印例子

<script type="text/javascript" language="javascript">
function printContent() {
var printContent = $("printtable").innerHTML;
var bodyContent = document.body.innerHTML;
document.body.innerHTML = printContent;
window.print();
document.body.innerHTML = bodyContent;
window.location.reload();
return;
}
</script>

你可能感兴趣的:(一个JS打印例子)