我想在我的项目中打印一些报告我的问题是打印报告格式你可以从链接中得到一些想法。现在我打印 div 但我想在打印时打印第一列隐藏
<script language="javascript" type="text/javascript">
function printDiv(divID)
{
//Get the HTML of div
var divElements = document.getElementById(divID).innerHTML;
//Get the HTML of whole page
var oldPage = document.body.innerHTML;
//Reset the page's HTML with div's HTML only
document.body.innerHTML =
"<html><head><title></title></head><body>" +
divElements + "</body>";
//Print Page
window.print();
//Restore orignal HTML
document.body.innerHTML = oldPage;
}
</script>