function Popup(data)
{
var mywindow = window.open('', 'day', 'height=300,width=400');
mywindow.height
mywindow.document.write('<html><head><title>my div</title>');
mywindow.document.write('<link rel="stylesheet" href="style.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.print();
return true;
}
答案 0 :(得分:0)
您可以定义css以在元素后创建分页符。
@media print
{
.some_element {page-break-after:always;}
}