<script language="javascript"> function printdiv(printpage) { var headstr = "<html><head><title></title></head><body>"; var footstr = "</body>"; var printData = document.getElementById("dvData").innerHTML; 获得 div 里的所有 html 数据 var oldstr = document.body.innerHTML; document.body.innerHTML = headstr+newstr+footstr; window.print(); document.body.innerHTML = oldstr; return false; }
已有 0人发表留言,猛击->> 这里<<-参与讨论
ITeye推荐