Answers for "How to fullscreen a window"

5

javascript full screen

//creating a button and linking it to bClicked()
document.onload=()=>{
  let b = documentbody.createElement("button");
  b.onclick = bClicked;
}

function bClicked(){
  //yourID is the id of element that you want to fullscreen 
  document.getElementByID("yourID").requestFullscreen();
}

//to exit fullscreen
document.exitFullscreen();
Posted by: Guest on April-12-2021

Code answers related to "How to fullscreen a window"

Code answers related to "Javascript"

Browse Popular Code Answers by Language