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();
答案 0 :(得分:0)
也许你想使用window.print()函数..