How to I redirect to another page *after* printing document?

前端 未结 5 1636
悲&欢浪女
悲&欢浪女 2020-12-17 06:31

I have an event called SubmitResponse().

A user is presented with a list of questions and possible responses. After completing the responses, the user

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 07:06

    For cross browser compatibility, you need to introduce a delay between the window.print() call and the redirect.

    I find the following works well (using JQuery framework to print a page as soon as it loaded):

     
    

    This can be easily adapted for "Print" buttons and links etc.

提交回复
热议问题