»
AnglaisFran�aisVietnamien

Imprimer - Expérience de gestion de la fenêtre - JavaScriptBank.com

Version compl�te: jsB@nk » Browser » Expérience de gestion de la fenêtre
URL: https://www.javascriptbank.com/window-management-experiment-index.html

Expérience de gestion de la fenêtre © JavaScriptBank.comCet JavaScript vous aide à gérer état de fenêtres pop-up.

Version compl�te: jsB@nk » Browser » Expérience de gestion de la fenêtre
URL: https://www.javascriptbank.com/window-management-experiment-index.html



JavaScript
<script>var w, winCount=3;var i, features;window.onload = function() {  if (document.layers) features="screenX=3000,screenY=0";  else features="left=3000,top=0";  w = new Array();  winOpen();}function winOpen() {  for (i=1; i<=winCount; ++i) {    if (!w[i] || w[i].closed) {      w[i] = window.open("window_open_"+i+".html", "win"+i, features);    }      w[i].resizeTo(300,300);    w[i].moveTo(i*30,i*30);    w[i].focus();  }}function winStatus() {  for (i=1; i<=winCount; ++i) {    if (w[i]) {      if (w[i].closed) alert('win'+i+' is closed');      else alert('win'+i+' is open');    }    else alert('invalid ref for win'+i);  }  }</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<p><a href="javascript:winStatus()">winStatus()</a> - this will display the open or closed status for each window.</p><p><a href="javascript:winOpen()">winOpen()</a> - this will re-initialize the windows. It gets called onload.</p><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->