Search
 
SCRIPT & CODE EXAMPLE
 

PHP

insert three bars in php that are used to minimize and maximize pages

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <script language="javascript" type="text/javascript">

function toggleFullScreen() {
  if (!document.fullscreenElement &&    // alternative standard method
      !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods
    if (document.documentElement.requestFullscreen) {
      document.documentElement.requestFullscreen();
    } else if (document.documentElement.msRequestFullscreen) {
      document.documentElement.msRequestFullscreen();
    } else if (document.documentElement.mozRequestFullScreen) {
      document.documentElement.mozRequestFullScreen();
    } else if (document.documentElement.webkitRequestFullscreen) {
      document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
    }
  } else {
    if (document.exitFullscreen) {
      document.exitFullscreen();
    } else if (document.msExitFullscreen) {
      document.msExitFullscreen();
    } else if (document.mozCancelFullScreen) {
      document.mozCancelFullScreen();
    } else if (document.webkitExitFullscreen) {
      document.webkitExitFullscreen();
    }
  }
}

document.addEventListener("fullscreenchange", function () {
    fullscreenState.innerHTML = (document.fullscreen)? "on" : "not ";
}, false);

document.addEventListener("mozfullscreenchange", function () {
    fullscreenState.innerHTML = (document.mozFullScreen)? "on" : "not ";
}, false);

document.addEventListener("webkitfullscreenchange", function () {
    fullscreenState.innerHTML = (document.webkitIsFullScreen)? "on" : "not ";
}, false);

document.addEventListener("msfullscreenchange", function () {
    fullscreenState.innerHTML = (document.msFullscreenElement)? "on" : "not ";
}, false);
</script>
</head>
<body>
<a href="javascript:void(0);" onclick="toggleFullScreen();">
Open in Full Screen Window</a>
<p>Fullscreen state: I'm <b id="fullscreenState"> not </b> fullscreen</p>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Php :: check backend post type 
Php :: Laravel polimorfic faker 
Php :: laravel integer data type 
Php :: Multiple trait declaration in PHP 
Php :: wp wc php remove product from cart if amount is 0 
Php :: wordpress function _() not working 
Php :: installer composer dans ionos 
Php :: Laravel Query: orderBy not working with groupBy (with a joined table) 
Php :: php calculate variance 
Php :: laravel rename file if exists 
Php :: Indexed Array 
Php :: carbon 
Php :: laravel faker realtext 
Php :: dot after each character php 
Php :: woocommerce disable payment method if coupon appied and total is 0 
Php :: PHP stripos — Find the position of the first occurrence of a case-insensitive substring in a string 
Php :: after i migrate wordpress website to new domain I cant login to wordpress admin 
Php :: hardening PHP7 
Php :: download yii 1.1 
Php :: df/mpdf/src/Cache.php on line 21 
Php :: Grab files matching particular file types in a directory 
Php :: findmany laravel 
Php :: to redo number_format php 
Php :: laravel select option form add please select option 
Php :: how to explode results from multi select form submitted 
Php :: undefined function bcmul php linux 
Php :: php random number routing 
Php :: breaking long array in php 
Php :: how can we manage category and product in laravek 
Php :: Change initial country + add top countiries on Caldera forms 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =