简体   繁体   中英

How to print the iframe content with scrollbar in angular js

In my application I have placed iframe with scroll bar.Can anybody tell how to take print the content

Thanks

if there's only one iframe and you didn't assign any name to it; you may simply simply use window.frames[0] in place of window.frames['myname'] )

function PrintIframe() { 

    if (window.frames['myname'].innerHTML != "") { 
        window.frames['myname'].focus();
        window.frames['myname'].print();
    } else {
        setTimeout(PrintIframe,1000);
    }    
 }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM