Answers for "full screen browser javascript"

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 "full screen browser javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language