JavaScript exitFullscreen() Method Tutorial

In this section, we will learn what the Element exitFullscreen() method is and how to use it in JavaScript.

What is Element exitFullscreen() Method in JavaScript?

The JavaScript Element exitFullscreen() method is used to exit from the fullscreen mode in elements, like <video>.

Note: you can use the requestFullscreen() method to open an element in fullscreen.

Element exitFullscreen() Method Syntax:

element.exitFullscreen();

Element exitFullscreen() Method Parameter

The method does not take an argument.

Element exitFullscreen() Method Return Value

The method does not return a value.

Example: using exitFullscreen() method in JavaScript

See the Pen using exitFullscreen() method in JavaScript by Omid Dehghan (@odchan1) on CodePen.

Leave a Reply