I want to trigger f11 event of keyboard using javascript or jquery, can anyone tell me how to do this ?
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With