onbeforeprint() and onafterprint() equivalent for non IE browsers

后端 未结 4 1866
慢半拍i
慢半拍i 2020-11-28 12:52

I want to send some info back to my database when a user prints a certain web page. I can do this in IE with onbeforeprint() and onafterprint() bu

4条回答
  •  清歌不尽
    2020-11-28 13:21

    I think that it's simply not possible to this properly. Or at least - not with any technology I know nor with any of the answers given previously.

    Both using onafterprint and using serverside dynamic-image-generating script would tell you that the page was printed even when the visitor merely went to print preview mode and then canceled out.

    However, I would like to learn how to get the proper information, so that I can be sure that page was actually printed.

提交回复
热议问题