1.将 Iframe 的内容弹出来 显示在一个独立的页面
function printReport()
{//页面的样式
var stxt = " ";
//得到名为 ag1 的 Iframe 的 document 的对象
var odoc=window.ag1.document;
//得到 Body 的内容
var r=odoc.body.createTextRange();
stxt +=r.htmlText;
//生成新的空白页
var pwin=window.open("","print");
//将 Iframe的内容填入空白页
pwin.document.write(stxt);
}
2.将多余的文字用....表示,以保持表格的美观
<td class="dabiao" title="afsddafdsfdsds" height="10" bgcolor="#ffffff" align="middle"><span style="OVERFLOW: hidden; WIDTH: 50px; TEXT-OVERFLOW: ellipsis"><nobr>afsddafdsfdsds</nobr> </span></td>