5168 shaares
38 private links
38 private links
var evt = document.createEvent("KeyEvents");
evt.initKeyEvent(
"keypress",
true,
true,
null,
false, // holds Ctrl key
false, // holds Alt key
false, // holds Shift key
false, // holds Meta key
evt.DOM_VK_F5, // presses a special key, @see http://mxr.mozilla.org/mozilla/source/d ... yEvent.idl
0 // presses a normal key, e.g. "A".charCodeAt(0),
);
document.documentElement.dispatchEvent(evt);