【发布时间】:2018-11-09 05:43:08
【问题描述】:
我在 codeigniter 中使用 Jquery 数据表,现在我想打印网页,但我想删除搜索框和分页 在打印网页期间。我怎样才能做到这一点?到目前为止,这是我的代码
<script type="text/javascript">
function PrintElem(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'new div', 'height=400,width=600');
mywindow.document.write('<html><head><title></title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.print();
mywindow.close();
return true;
}
</script>
<input type="button" value="Print" onclick="PrintElem('#yourdiv')" />
【问题讨论】:
标签: php codeigniter pagination