本文介绍了打印网页问题 :: 寻找打印网页的好教程(由 Jquery ui、jqgrid、zend 构建)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该使用 jqgrid、Jquery 日历+其他 Jquery ui+背景图像等打印网站的网页.在服务器端使用 Zend 框架构建.

I should print web-pages of website with jqgrid , Jquery calendar+ other Jquery ui+background images etc.. in server side its build with Zend Framework.

我没有网页打印方面的经验和知识,但我在工作中完成了这项任务.

I don't have experience and knowledge in web page printing, but i get this mission in my job.

我需要:

  1. 很好的教程或书籍(我读过背景图像问题)来很好地研究这个问题(我有时间).

  1. Good tutorials or book (i read about background images problem) to study this issue well (I have time for that).

更实用的说明如何打印使用 Jquery + Jquery UI + jqgrid 构建的网页(我知道 Jquery UI 与 yui(雅虎库)相比存在浏览器兼容性问题).

More practical instructions how print web pages that build with Jquery + Jquery UI + jqgrid (I know that Jquery UI have browsers compatibity issues vs yui (yahoo library)).

感谢所有在这里提供帮助的伟大人物,

Thanks for all great people here that helps,

推荐答案

关于样式表定义的 media 属性,您可以解决很多打印问题.你可以声明

A lot of problems with printing you can solve with respect of media attribute of the stylesheet definition. You can declare

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

要包含一些仅用于屏幕的 css,请使用 media="all" 定义一些信息同时显示在屏幕和打印机上,或者使 html 元素仅在打印时显示.例如,使用 jQuery UI,您可以找到仅打印选定选项卡(或手风琴)的好主意.你会发现不打印一些隐藏的 div 很有用,比如 div.loadingui.所以你可以制作一个像

to include some css for screen only, use media="all" to define some information be displayed on both screen and printer or make a html elements be displayed only during printing. With jQuery UI for example you can find a good idea to print only a selected tab (or accordion). You can find useful not print some hidden divs like div.loadingui. So you can make a CSS like

<style  type="text/css" media="screen">
    #printableButNotVisible { display:none }
</style>
<style type="text/css" media="print">
    #accordion h3, #vcol, div.loadingui, div.ui-tabs-hide,
               ul.ui-tabs-nav li, td.HeaderRight { display:none }
    #printableButNotVisible { display:block }
</style>

这只是一个例子,但我希望能说明主要思想.此外,您可以动态创建 css 并在您的 html 文档中插入或切换(请参阅 http://docs.jquery.com/Tutorials:5_Quick_jQuery_Tips#Switch_A_Stylesheet).

It's only an example, but I hope to explain the main idea. Moreover you can dynamically create a css and insert or switch in your html document (see http://docs.jquery.com/Tutorials:5_Quick_jQuery_Tips#Switch_A_Stylesheet).

在打印过程中从页面中删除菜单可能是个好主意,但我无法举例,因为我不知道您使用的是哪种菜单.

It can be a good idea to remove menus from the page during printing, but I can gives you no example, because I don't know what kind of menus you use.

如果有人知道用于 jQuery UI 和 jqGrid 的印刷媒体的良好 CSS,那对我来说也会很有趣.

If somebody knows a good CSS for print media for jQuery UI and for jqGrid it would be very interesting for me too.

这篇关于打印网页问题 :: 寻找打印网页的好教程(由 Jquery ui、jqgrid、zend 构建)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 02:20
查看更多