7,765
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
function PrintGridView() {
// 打开一个新网页
var newwindow = window.open('printer','','');
// 将指定DIV中的内容写入该网页
newwindow.document.write(document.getElementById('dvBody').innerHTML);
newwindow.document.close();
// 打印该网页
newwindow.focus();
newwindow.print();
// 打印完毕后关闭该窗口
newwindow.close();
return;
}
</script>