<!DOCTYPE HTML><HTML><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><Body><ButtonID= "BTN" >JS Control page Full screen display and exit full screen</Button><DivID= "Content"style= "Height:500px;width:500px;background: #fff"> <H1>JS Control page Full screen display and exit full screen</H1></Div></Body><Scriptlanguage= "JavaScript">document.getElementById ("btn"). onclick=function(){ varElem=document.getElementById ("content"); Requestfullscreen (Elem); }; functionRequestfullscreen (Element) {varRequestmethod=Element.requestfullscreen||Element.webkitrequestfullscreen||Element.mozrequestfullscreen||Element.msrequestfullscreen; if(Requestmethod) {requestmethod.call (element); } Else if (typeofwindow. ActiveXObject!== "undefined") { varWScript= NewActiveXObject ("Wscript.Shell"); if(WScript!== NULL) {WScript. SendKeys ("{F11}"); } }}</Script></HTML>
JS Control page Full screen display and exit full screen