In increasingly real web applications, JavaScript is becoming more and more powerful.
FullScreen API is a new JavaScript API, simple and powerful. FullScreen allows us to programmatically request full screen display from users. If the interaction is completed, we can exit the full screen state at any time.
Demo:Fullscreen API Example
(In this demo, you can display related attributes in Launch, Hide, and Dump, and you can view log information through the Chrome console.)
Start full screen modeThe full-screen API requestFullscreen method still uses prefixed method names in some old browsers, so detection and judgment may be required:
(Prefixed, meaning that each browser kernel is not common.)
Copy the code