What event is fired when window.print() is called?
问题 I am trying to work through this question and I have had little success tonight. I think I can make the code below work if I only knew what event was fired when the window.print() function is called. var browser_name = navigator.appName; if(browser_name == 'Microsoft Internet Explorer'){ window.attachEvent("print()",on_print_function);//I realize I cannot attach an event listener to a function, I just wanted you to see what I am trying to accomplish } else{ window.addEventListener("print()"