Place the full screen of the browser and refresh it when you click (simulate F11).

I looked over 10 questions with one content, but did not find an updated answer. (the world of the network is changing rapidly, I think). Firstly, is it possible to put the current window in full screen mode, simulating F11, click on the user click button. also, which is best suited for this if I want the function to work in all major browsers (IE, FF, Chrome and Safari).

How to make Javascript in fullscreen windows (stretching across the screen)

Simulate F11 with javascript

onclick go full screen

including the above links, I went through many questions, but had no judgment. This is really useful if someone can come up with an idea. Thank you

+4
source share
2 answers
+3
source

This question is probably a duplicate of the question you contacted. Latest cross-browser solution:

function requestFullScreen(elt) { console.log("Requesting fullscreen for", elt); if (elt.requestFullscreen) { elt.requestFullscreen(); } else if (elt.msRequestFullscreen) { elt.msRequestFullscreen(); } else if (elt.mozRequestFullScreen) { elt.mozRequestFullScreen(); } else if (elt.webkitRequestFullscreen) { elt.webkitRequestFullscreen(); } else { console.error("Fullscreen not available"); } } 

Please note that this is an “experimental technology” in this post. See this answer and this MDN page for more details.

+1
source

Source: https://habr.com/ru/post/1495485/


All Articles