exitFullscreen()方法请求将当前处于全屏模式的元素从全屏模式中取出。如果元素未处于全屏模式,则不会发生任何更改。此方法的反面是requestFullscreen() 。
句法:
HTMLElementObject.exitFullscreen()
参数:不需要参数。
返回值:无返回值。
例子:
HTML | DOM exitFullscreen() Method
Welcome to GeeksforGeeks
Click on the "Open Fullscreen" button to open this page in"
+ "fullscreen mode. Close it by either clicking the "Esc" key"
+" on your keyboard, or with the "Close Fullscreen" button.
输出:
打开全屏
退出全屏
支持的浏览器: DOM exitFullscreen()方法支持的浏览器如下:
- 谷歌浏览器
- IE浏览器
- 火狐
- 歌剧
- 苹果浏览器