Answers for "fullscreen javascript w3school"

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 "fullscreen javascript w3school"

Code answers related to "Javascript"

Browse Popular Code Answers by Language