Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute keybord shortcut CTRL + P by clicking a link using jquery [duplicate]

I want to print a page to do so I have to click CTRL + P, so I would like to make a link to ease the process. Any help is appreciated!

like image 252
Anas Abouzaradi Avatar asked Jun 08 '15 14:06

Anas Abouzaradi


1 Answers

You don't need to simulate a CTRL + P keypress to print the window - you can just call window.print() when required instead.

like image 143
Rory McCrossan Avatar answered Nov 18 '22 22:11

Rory McCrossan