let iframeDom = document.getElementById("easyPrintIframe").contentWindow;
let images = iframeDom.document.getElementsByTagName('img');
console.log('所有图片:',images);
参考:
https://blog.csdn.net/liaozhongping/article/details/48542883?utm_medium=distribute.pc_relevant_t0.none-task-blog-OPENSEARCH-1.compare&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-OPENSEARCH-1.compare