我想打印一个我放在iframe但不希望内容显示在网页上的页面,但是当我把iframe放到display ='none'时打印按钮不起作用
我做了什么: - 我设置iframe风格='无'
"name ="frame1"><input type="button" onclick="frames['frame1'].print()" value="print!">
Run Code Online (Sandbox Code Playgroud)
如何打印iframe的内容而不在网页上显示或者保持ifram隐藏
非常感谢任何帮助......
您执行打印css文件,并在该文件中没有display:none样式.
<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />
Run Code Online (Sandbox Code Playgroud)
感谢Dror,这是媒体类型的链接.
| 归档时间: |
|
| 查看次数: |
2847 次 |
| 最近记录: |