Today I saw a very interesting API, you can use js to operate the browser to enter the full screen state.
requestFullscreen
<button id="fullscreen-button">Enter Fullscreen</button>
document.querySelector('#fullscreen-button').addEventListener("click", function(e) {
toggleFullScreen();
}, false);
function toggleFullScreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
}
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。