& lt; The button id="fullScreen" onclick="fullScreen ()" & gt;
$(" # fullScreen "). The trigger (" click ");
The function fullScreen () {
The debugger
Var element=document. DocumentElement;
If (element. RequestFullscreen) {
Element. RequestFullscreen ();
{} else if (element msRequestFullscreen)
Element. MsRequestFullscreen ();
{} else if (element mozRequestFullScreen)
Element. MozRequestFullScreen ();
{} else if (element webkitRequestFullscreen)
Element. WebkitRequestFullscreen ();
}
}
CodePudding user response:
Window. The onl oad=function () {$(" # fullScreen "). The trigger (" click ");
}
It's no use also tried