需求
1.实现打印功能:
var iframe=document.getElementById("issuedViewIfram");
//页面有个 <iframe style="display: none" id="issuedViewIfram"></iframe>
var el = document.getElementById("textContent");
//选择 要打印部分的 id
iframe = document.createElement('IFRAME');
//从这往下 可以酌情删除一些东西 也是可以实现的,具体一下怎么实现的我也不清楚,能实现就行
var doc = null;
iframe.setAttribute("id", "print-iframe");
iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;');
document.body.appendChild(iframe);
doc = iframe.contentWindow.document;
//这里可以自定义样式
// doc.write(&