How to trigger f11 event of keyboard using javascript or jquery?

You can try using this one: http://andrew.hedges.name/experiments/fullscreen/


You can't make people's computers type things through javascript. It violates the sandboxing environment of browsers. I assume that you are trying to make a window go full screen though. This SO question covers that.

How to make the window full screen with Javascript (stretching all over the screen)


I'm use this code:

function go_full_screen(){
  var elem = document.documentElement;
  if (elem.requestFullscreen) {
    elem.requestFullscreen();
  } else if (elem.msRequestFullscreen) {
    elem.msRequestFullscreen();
  } else if (elem.mozRequestFullScreen) {
    elem.mozRequestFullScreen();
  } else if (elem.webkitRequestFullscreen) {
    elem.webkitRequestFullscreen();
  }
}
<a href="#" onClick="go_full_screen();">Full Screen / Compress Screen</a>