0

How can I simulate a keyPress event to open the print menu on Chrome with JavaScript or jQuery?

The keys are Ctrl + P

I tried this code in JavaScript but it doesn't work.

function imprimer() {
    robot.keyPress(17);
    robot.keyPress(80);
}
window.onload = imprimer();
Michael Doye
  • 8,063
  • 5
  • 40
  • 56

1 Answers1

0

Maybe you want use window.print() function..