如何打印在PHP网页中的一部分 [英] how to print only a part of a webpage in php

查看:142
本文介绍了如何打印在PHP网页中的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打印一个按钮点击一个网页的一部分,而无需打开另一个页面。我需要打印页面的一部分已用ajax被称为 所以,如果有人可以帮助我,我会很感激

I am trying to print a part of a page with a single button click without opening a different page . The part of the page that i need to print has been called using ajax so if anybody could help me i would be really thankful

推荐答案

使用CSS的介质打印来控制你的页面打印,然后只用window.print()。无需调用其他页面。您可以隐藏部分网页的这种方式(侧菜单等等)。

Use the CSS media print to control how your page is printed and then just use window.print(). No need to call another page. You can hide parts of your page this way (side menus and so forth).

这篇关于如何打印在PHP网页中的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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