开发者

Print Frame Chrome

开发者 https://www.devze.com 2023-02-20 15:32 出处:网络
I\'m trying to print a pop up window using the following code : window.frames[\'cInitChecksWindow_IFrame\'].focus();

I'm trying to print a pop up window using the following code :

window.frames['cInitChecksWindow_IFrame'].focus();
window.print();

When I view the print page the 开发者_Go百科html of parent page is also passed along with pop-up window in Chrome. I just need the html of pop-up. This works fine in IE all versions with the same code.

Any help on how to print controls in Chrome will be helpful?


Try the following:

window.frames['cInitChecksWindow_IFrame'].print();

This will print only the iframe for me, however, if the iframe contains scrollbars, they will be printed while the hidden content will not.

0

精彩评论

暂无评论...
验证码 换一张
取 消