js实现局部打印,并处理浏览器提示Avoid using document.write()导致无法打印问题
//新建iframeconst iframe = document.createElement('IFRAME');let doc = null;//添加属性iframe.setAttribute('style', 'position:absolute;width:0px;height:0px;left:-500px;top:-400px;');//插入document.body.appendChild(iframe)doc = iframe.contentWindow.docu
原创
2021-08-12 11:54:51 ·
4174 阅读 ·
1 评论