2

我想问是否有办法捕获打印事件(如 IE onbeforeprint 和 onafterprint 事件)。其实我还想做更多。我想知道我是否可以中断打印、取消打印或者可能将打印选项全部更改为具有 myPrint 选项。这可以通过 plugins/extensions/XPCOM 来实现吗?实际上我想要一个跨浏览器控件,我不介意在不同的浏览器中有单独的控件。如果可能的话,通过 IE 中的插件、mozilla 中的扩展/XPCOM 和 Chrome 扩展。

4

1 回答 1

1

I'll quote danieltalsky answer to the Javascript Event Handler for Print post since I think that the same applies in your situation:

In IE there are the nonstandard window.onBeforePrint() and window.onAfterPrint() event listeners. There isn't a non-IE way to do it that I know of, however.

What kinds of changes are you trying to make? It's possible that your problem could be solved by specifying different rules for your print stylesheet.

于 2010-08-30T12:43:37.347 回答