如何打印隐藏的iframe的内容是什么? [英] how to print the contents of a hidden iframe?

查看:146
本文介绍了如何打印隐藏的iframe的内容是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要打印我放在一个iframe页面,但不希望的内容显示在网页上,但打印按钮不工作时,我把iframe来显示=无

i want to print a page which i put in an iframe but dont want the contents to be displayed in the webpage , but the print button doesnt work when i put the iframe to display='none'

我所做的: - 我设置的iframe风格=无

what i did:- i set the iframe style='none'

<input type="button" onclick="frames['frame1'].print()" value="print!">

如何打印iframe的内容,而不在网页上显示,或通过保持IFRAM隐藏的说

how can i print the contents of iframe without displaying it on the webpage or say by keeping the ifram hidden

倒很AP preciate任何帮助......

would really appreciate any help.....

推荐答案

您做一个打印的CSS文件,该文件中没有显示:无风格

You do a print css file, and within that file you do not have the display: none style.

<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />

下面是媒体类型的链接,感谢德罗尔。

这篇关于如何打印隐藏的iframe的内容是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆