用客户端javascript捕获打印事件? [英] catch print event with client-side javascript?

查看:56
本文介绍了用客户端javascript捕获打印事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。


我知道我可以使用window.print()打印一个页面,但是当有人从浏览器打印文件时,有没有办法让b $ b抓住打印事件?


谢谢。


mp

解决方案

你看过onBeforePrint活动吗?我不确定它是不是IE特定的

虽然。


VK写道:

你看过onBeforePrint活动吗?我不确定它是不是IE特定的
虽然。




它*是* IE特定的,因此不建议在全球网站。

PointedEars

-

出于某种原因,通过整个quip列表阅读似乎是一个很好的结果

比做一些FoxPro开发更有吸引力...无法想象

为什么! [ www.rubberturnip.org.uk]


> >你看过onBeforePrint活动吗?我不确定它是不是IE

具体的

尽管。





恕我直言,提及浏览器特定的方法和属性是完全可以的,因为

,只要你在帖子中标记它(仅限IE,可能不适用于X等)


有时你无法达到相同的结果在不同的

浏览器上以相同的方式。然后你必须线索几个解决方案。


在这种情况下:是否有基于Mozilla的浏览器的具体解决方法?


Hi.

I know I can use "window.print()" to print a page, but is there a way to
catch a print event when someone prints a document from the browser?

Thanks.

mp

解决方案

did you look at onBeforePrint event? i''m not sure if it isn''t IE specific
though.


VK wrote:

did you look at onBeforePrint event? i''m not sure if it isn''t IE specific
though.



It *is* IE specific and therefore not to be recommended on the global Web.
PointedEars
--
For some reason, reading right through the entire quip list seemed a helluva
lot more attractive than doing some FoxPro development... Can''t imagine
why! [www.rubberturnip.org.uk]


> > did you look at onBeforePrint event? i''m not sure if it isn''t IE
specific

though.



It *is* IE specific and therefore not to be recommended on the global Web.



IMHO it''s totally OK to mention browser-specific methods and property, as
long as you mark it in your posting (IE only, may not work in X, etc)

Sometimes you just cannot reach the same result in the same way on different
browsers. Then you have to "clue" together several solutions.

In this case: is there any specific workaround for Mozilla-based browsers?


这篇关于用客户端javascript捕获打印事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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